Skip to content

Commit

Permalink
Fixes documentation discrepancy
Browse files Browse the repository at this point in the history
Updates the behavior of `updateChallengeInfo` to match the documented
behavior of defaulting to `CMGR_DIR` (or `.` if not explicitly set).

Fixes #34
  • Loading branch information
John E. Rollinson committed Dec 1, 2021
1 parent f646e12 commit 42809ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/cmgr/challenges.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ func updateChallengeInfo(mgr *cmgr.Manager, args []string) int {
path := "."
if parser.NArg() == 1 {
path = parser.Arg(0)
} else {
chalDir, isSet := os.LookupEnv(cmgr.DIR_ENV)
if isSet {
path = chalDir
}
}

var updates *cmgr.ChallengeUpdates
Expand Down

0 comments on commit 42809ce

Please sign in to comment.