Skip to content

Commit 579a37b

Browse files
committed
fix: empty argument
1 parent 38f046c commit 579a37b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

internal/nix/nix.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ func (*Nix) PrintDevEnv(ctx context.Context, args *PrintDevEnvArgs) (*PrintDevEn
7575
}
7676

7777
if len(data) == 0 {
78-
optionalImpureFlag := ""
78+
cmd := command("print-dev-env", "--json")
7979
if featureflag.ImpurePrintDevEnv.Enabled() {
80-
optionalImpureFlag = "--impure"
80+
cmd.Args = append(cmd.Args, "--impure")
8181
}
82-
cmd := command("print-dev-env", "--json", optionalImpureFlag,
83-
"path:"+flakeDirResolved,
84-
)
82+
cmd.Args = append(cmd.Args, "path:"+flakeDirResolved)
8583
slog.Debug("running print-dev-env cmd", "cmd", cmd)
8684
data, err = cmd.Output(ctx)
8785
if insecure, insecureErr := IsExitErrorInsecurePackage(err, "" /*pkgName*/, "" /*installable*/); insecure {

0 commit comments

Comments
 (0)