fix: resolve all syntax errors in provisioning modules

Fixed 29 syntax errors across 4 modules:
- servers/ (6 files, 13 errors): Fixed parentheses in PROVISIONING_ARGS expressions
- taskservs/ (4 files, 6 errors): Fixed parentheses in string interpolation
- main_provisioning/ (3 files, 3 errors): Fixed environment variable access
- lib_provisioning/utils/ (2 files, 2 errors): Fixed standalone env access

Pattern fixed:
- $"($env.PROVISIONING_ARGS? | default "") " → $"(($env.PROVISIONING_ARGS? | default "")) "
- $env.PROVISIONING_ARGS? | default "" → ($env.PROVISIONING_ARGS? | default "")

All modules now have valid Nushell syntax for proper parsing.
This commit is contained in:
Jesús Pérez 2025-09-23 00:00:01 +01:00
parent 1743dc82c2
commit 37ee6486d5
17 changed files with 62 additions and 24 deletions

View file

@ -11,7 +11,7 @@ def prompt_delete [
exit 0
}
}
if not $yes or not (($env.PROVISIONING_ARGS? | default "") | str contains "--yes") {
if not $yes or not ((($env.PROVISIONING_ARGS? | default "")) | str contains "--yes") {
_print ( $"To (_ansi red_bold)delete ($target_name) (_ansi reset) " +
$" (_ansi green_bold)($name)(_ansi reset) type (_ansi green_bold)yes(_ansi reset) ? "
)

View file

@ -63,7 +63,7 @@ export def "main generate" [
let str_template = if $template == null { "" } else { $template }
let cmd_target = if ($args | length) > 0 { ($args| get 0) } else { "" }
$env.PROVISIONING_MODULE = "generate"
let ops = $"($env.PROVISIONING_ARGS? | default "") " | str replace $env.PROVISIONING_MODULE "" | str replace $" ($cmd_target) " "" | str trim
let ops = $"(($env.PROVISIONING_ARGS? | default "")) " | str replace $env.PROVISIONING_MODULE "" | str replace $" ($cmd_target) " "" | str trim
#generate_provision $args $curr_settings $str_template
match $cmd_target {
"new" | "n" => {

View file

@ -11,7 +11,7 @@ def prompt_update [
exit 0
}
}
if not $yes or not (($env.PROVISIONING_ARGS? | default "") | str contains "--yes") {
if not $yes or not ((($env.PROVISIONING_ARGS? | default "")) | str contains "--yes") {
_print ( $"To (_ansi red_bold)update ($target_name) (_ansi reset) " +
$" (_ansi green_bold)($name)(_ansi reset) type (_ansi green_bold)yes(_ansi reset) ? "
)