You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Place azd exec flags (like `--cwd`, `--debug`, `--environment`) before the script. Everything after the script is passed through to the script; `--` remains optional if you prefer an explicit separator.
52
+
51
53
### Description
52
54
53
55
Executes scripts and commands with access to:
@@ -68,22 +70,22 @@ azd exec ./deploy.sh
68
70
azd exec'echo "Environment: $AZURE_ENV_NAME"'
69
71
70
72
# Specify shell explicitly
71
-
azd exec./setup.ps1 --shell pwsh
73
+
azd exec --shell pwsh ./setup.ps1
72
74
73
75
# Run in interactive mode (for scripts with prompts)
74
-
azd exec ./interactive-setup.sh --interactive
76
+
azd exec--interactive ./interactive-setup.sh
75
77
76
78
# Pass arguments to the script
77
-
azd exec ./build.sh -- --verbose --config release
79
+
azd exec ./build.sh --verbose --config release
78
80
79
81
# Inline PowerShell command
80
-
azd exec'Write-Host "Hello from $env:AZURE_ENV_NAME"' --shell pwsh
82
+
azd exec--shell pwsh 'Write-Host "Hello from $env:AZURE_ENV_NAME"'
81
83
82
-
# Execute with debug logging
83
-
azd exec ./deploy.sh --debug
84
+
# Execute with debug logging (flags before the script)
85
+
azd exec--debug ./deploy.sh
84
86
85
-
# Use specific environment
86
-
azd exec./deploy.sh --environment production
87
+
# Use specific environment (flags before the script)
88
+
azd exec --environment production ./deploy.sh
87
89
```
88
90
89
91
### Flags
@@ -108,14 +110,14 @@ azd exec ./deploy.sh --environment production
108
110
109
111
### Script Arguments
110
112
111
-
Arguments after `--`are passed directly to your script:
113
+
Arguments after the script are passed directly to it—no `--`separator required. You can still use `--` if you prefer to explicitly stop flag parsing.
0 commit comments