Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
(GH-163) Fix --codedir flag default
Browse files Browse the repository at this point in the history
This commit sets the default `--codedir {string}` value to the current
working directory.
  • Loading branch information
petergmurphy committed May 5, 2022
1 parent 1b117ff commit 056a34f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.1]

- [(GH-163)](https://github.com/puppetlabs/pct/issues/341) `--codedir {string}` flag is omitted, use working directory

## [0.2.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion cmd/exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func CreateCommand(parent *prm.Prm) *cobra.Command {
err = viper.BindPFlag("toolpath", tmp.Flags().Lookup("toolpath"))
cobra.CheckErr(err)

tmp.Flags().StringVar(&prmApi.CodeDir, "codedir", "", "location of code to execute against")
tmp.Flags().StringVar(&prmApi.CodeDir, "codedir", ".", "location of code to execute against")
err = viper.BindPFlag("codedir", tmp.Flags().Lookup("codedir"))
cobra.CheckErr(err)

Expand Down
2 changes: 1 addition & 1 deletion cmd/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func CreateCommand(parent *prm.Prm) *cobra.Command {
err = viper.BindPFlag("toolpath", tmp.Flags().Lookup("toolpath"))
cobra.CheckErr(err)

tmp.Flags().StringVar(&prmApi.CodeDir, "codedir", "", "location of code to execute against")
tmp.Flags().StringVar(&prmApi.CodeDir, "codedir", ".", "location of code to execute against")
err = viper.BindPFlag("codedir", tmp.Flags().Lookup("codedir"))
cobra.CheckErr(err)

Expand Down

0 comments on commit 056a34f

Please sign in to comment.