Skip to content

Commit

Permalink
Don't add nest deeper if it is already under 'dev.'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething committed Oct 18, 2022
1 parent e0369a3 commit b879d3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions commands/apps_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ func AppsDev() *Command {
"An optional existing app ID. If specified, the app spec will be fetched from the given app.",
)

AddStringFlag(
build, doctl.ArgAppDevConfig,
"", "",
`Path to the app dev config.`,
)

AddStringFlag(
build, doctl.ArgEnvFile,
"", "",
Expand Down
2 changes: 1 addition & 1 deletion commands/doit.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func AddStringFlag(cmd *Command, name, shorthand, dflt, desc string, opts ...fla
// app dev config set/unset --dev-config flag to be nested deeper.
// i.e dev.config.set.dev-config over config.set.dev-config
// This prevents a conflict with the base config setting.
if name == doctl.ArgAppDevConfig {
if name == doctl.ArgAppDevConfig && !strings.HasPrefix(fn, appDevConfigFileNamespace+".") {
fn = fmt.Sprintf("%s.%s", appDevConfigFileNamespace, fn)
}

Expand Down

0 comments on commit b879d3c

Please sign in to comment.