-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove data races by avoiding global CLI logger (#43)
* Updated README.md * Updated build.yml * comment out nasty data race lines, to see how they fare on CI * bump golangci-lint in CI * restore color.NoColor line * restore debug level * revert that * No more global logger * fix lints * Padding is no longer a global * reverted formatting changes in shell_test.go * don't customize console color during tests * finally fixed the data race in tests * Add GHA test annotation * remove verbose flag on test run because it no longer does anything * remove test annotation action * Comment out color-mode customization * Fix parallel testing issues (maybe?)
- Loading branch information
Showing
37 changed files
with
373 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
Copyright (C) 2020 Aaron Sky. | ||
This file is part of Cider, a tool for automating submission | ||
of apps to Apple's App Stores. | ||
Cider is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
Cider is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with Cider. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
// Package clicommand declares the command line interface for Cider. | ||
package clicommand | ||
|
||
import ( | ||
"github.com/cidertool/cider/internal/log" | ||
) | ||
|
||
func newLogger(debugFlagValue *bool) *log.Log { | ||
logger := log.New() | ||
|
||
// Comment this out as it's causing issues during parallel testing | ||
// if os.Getenv("CI") != "" { | ||
// logger.SetColorMode(false) | ||
// } | ||
|
||
if debugFlagValue != nil { | ||
logger.SetDebug(*debugFlagValue) | ||
logger.Debug("debug logs enabled") | ||
} | ||
|
||
return logger | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.