Conversation
Add -file argument handling and automatic .js extension, allowing the script to locate and run app.js via cscript (interactive) when provided. Improve argument parsing to support -dev and -file together, surface file/branch choices in logs, and reorganize steps/messages for clearer temporary workspace, download, extraction, and execution flow. Default bootstrap behavior remains (launch bootstrap.bat non-blocking), with updated success/failure reporting.
Clarify and expand the usage comments in bootstrap.ps1: add a "Quick start (no arguments)" note and a recommended "With arguments" workflow that shows saving the script locally and invoking it with -dev and -file parameters. Reformat example commands for clarity; no functional code changes.
Reviewer's GuideRefactors bootstrap.ps1 to support a new -file argument for running app.js via cscript with an explicit JS file, updates usage docs, and changes the default bootstrap behavior to launch either app.js or bootstrap.bat in a non-blocking way while simplifying the temporary workspace steps. Sequence diagram for the updated bootstrap.ps1 execution flowsequenceDiagram
actor User
participant PowerShell as PowerShell_bootstrap.ps1
participant GitHub as GitHub_repo
participant Cmd as cmd_exe
participant CScript as cscript
User->>PowerShell: Invoke bootstrap.ps1 (optional -dev, -file)
PowerShell->>PowerShell: Set branch from -dev or positional
PowerShell->>PowerShell: Set fileArg from -file
PowerShell->>PowerShell: Auto-append .js if fileArg has no extension
PowerShell->>GitHub: Download branch zip
GitHub-->>PowerShell: ZIP archive
PowerShell->>PowerShell: Extract archive to temp workspace
alt fileArg specified
PowerShell->>PowerShell: Locate app.js in extracted repo
PowerShell->>Cmd: Start-Process cmd.exe /k cscript app.js fileArg
Cmd->>CScript: Run app.js with fileArg (interactive)
CScript-->>Cmd: Script output
Cmd-->>User: Interactive console stays open
else no fileArg
PowerShell->>PowerShell: Locate bootstrap.bat in extracted repo
PowerShell->>Cmd: Start-Process cmd.exe /c bootstrap.bat
Cmd-->>User: Non-blocking bootstrap execution
end
PowerShell-->>User: Print WelsonJS execution started
Flow diagram for argument parsing and execution paths in bootstrap.ps1flowchart TD
A[Start bootstrap.ps1] --> B[Initialize branch = defaultBranch, fileArg = null]
B --> C{More args?}
C -->|Yes| D[Read current arg]
C -->|No| G
D --> E{arg == -dev and has next?}
E -->|Yes| E1[Set branch = next arg, increment i] --> F
E -->|No| F[Check -file]
F --> F1{arg == -file and has next?}
F1 -->|Yes| F2[Set fileArg = next arg, increment i] --> H
F1 -->|No| F3{arg does not start with -}
F3 -->|Yes| F4[Set branch = arg] --> H
F3 -->|No| H[Increment i]
H --> C
G[Finish arg parsing] --> I{fileArg set?}
I -->|Yes| J{fileArg has extension?}
I -->|No| N
J -->|No| K[Append .js to fileArg]
J -->|Yes| L[Keep fileArg as is]
K --> M
L --> M
M[Log branch and fileArg] --> O[Create temp workspace]
N[Log branch only] --> O
O --> P[Download branch ZIP from GitHub]
P --> Q[Extract ZIP]
Q --> R{fileArg set?}
R -->|Yes| S[Locate app.js]
S --> T{app.js found?}
T -->|No| U[Throw error app.js not found]
T -->|Yes| V[Start cmd.exe /k cscript app.js fileArg]
V --> W[Print WelsonJS execution started]
R -->|No| X[Locate bootstrap.bat]
X --> Y{bootstrap.bat found?}
Y -->|No| Z[Throw error bootstrap.bat not found]
Y -->|Yes| AA[Start cmd.exe /c bootstrap.bat]
AA --> W
W --> AB[End]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Review Summary by QodoAdd file argument support and improve bootstrap.ps1 documentation
WalkthroughsDescription• Add -file argument support to run custom JavaScript files via cscript • Implement automatic .js extension appending for file arguments • Refactor argument parsing to support -dev and -file together • Improve usage documentation with quick start and recommended workflow examples • Reorganize execution flow with conditional branching for file vs. bootstrap modes • Change bootstrap execution to non-blocking with updated success messaging Diagramflowchart LR
A["Parse Arguments<br/>-dev, -file"] --> B["Create Temp<br/>Workspace"]
B --> C["Download<br/>Package"]
C --> D["Extract<br/>Archive"]
D --> E{File Arg<br/>Provided?}
E -->|Yes| F["Run app.js<br/>via cscript"]
E -->|No| G["Run bootstrap.bat<br/>non-blocking"]
F --> H["Execution<br/>Started"]
G --> H
File Changes1. bootstrap.ps1
|
Code Review by Qodo
1. Unvalidated $fileArg in cmd.exe
|
📝 WalkthroughWalkthroughThe bootstrap.ps1 script is extended to support a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- When deciding whether to auto-append ".js" to
-file, consider using[System.IO.Path]::GetExtension($fileArg)instead of a regex match on"."to avoid misclassifying paths that contain dots in folder names but no file extension. - The new
-fileexecution path invokescmd.exe /k cscript ...without waiting on or checking the exit code; if error reporting or scripting usage is important, you may want to use-Wait -PassThruand surface failures similarly to how the old bootstrap path handled them.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- When deciding whether to auto-append ".js" to `-file`, consider using `[System.IO.Path]::GetExtension($fileArg)` instead of a regex match on `"."` to avoid misclassifying paths that contain dots in folder names but no file extension.
- The new `-file` execution path invokes `cmd.exe /k cscript ...` without waiting on or checking the exit code; if error reporting or scripting usage is important, you may want to use `-Wait -PassThru` and surface failures similarly to how the old bootstrap path handled them.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
All updates of master branch until 2026-04-18
|
| Start-Process "cmd.exe" ` | ||
| -ArgumentList "/k cscript `"$($app.FullName)`" `"$fileArg`"" | ||
|
|
There was a problem hiding this comment.
1. Unvalidated $filearg in cmd.exe 📘 Rule violation ⛨ Security
$fileArg (user-controlled via -file) is interpolated into a cmd.exe command line without validation/escaping, so quotes/metacharacters can break argument parsing or enable command injection. This violates the requirement to validate inputs/constraints before operating on them.
Agent Prompt
## Issue description
`$fileArg` is user-controlled and is embedded into a `cmd.exe` command line without strict validation/escaping, which can lead to command-line injection or unexpected parsing.
## Issue Context
`-file` is parsed from `$args` and later used to build `Start-Process "cmd.exe" -ArgumentList ...`.
## Fix Focus Areas
- bootstrap.ps1[89-106]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| Write-Step "Executing bootstrap (non-blocking)..." | ||
|
|
||
| Start-Process "cmd.exe" ` | ||
| -ArgumentList "/c `"$($bootstrap.FullName)`"" | ||
|
|
||
| Write-Ok "Bootstrap launched" |
There was a problem hiding this comment.
2. Fire-and-forget start-process call 📘 Rule violation ☼ Reliability
The script launches bootstrap.bat with Start-Process without -Wait/-PassThru, so failures and non-zero exit codes are not observed or reported. This matches the checklist’s prohibition on unobserved fire-and-forget operations where faults can be lost.
Agent Prompt
## Issue description
`Start-Process` is used in a fire-and-forget way, which prevents observing failures (exit code) and reporting them.
## Issue Context
The default bootstrap flow used to be blocking and could validate success; now it launches and immediately reports "Bootstrap launched".
## Fix Focus Areas
- bootstrap.ps1[120-126]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| Start-Process "cmd.exe" ` | ||
| -ArgumentList "/k cscript `"$($app.FullName)`" `"$fileArg`"" | ||
|
|
There was a problem hiding this comment.
3. Wrong cscript bitness 🐞 Bug ≡ Correctness
In -file mode, bootstrap.ps1 launches cscript via cmd.exe without forcing the 32-bit
SysWOW64\cscript.exe that bootstrap.bat uses, which can break scripts that depend on the 32-bit
WelsonJS.Toolkit COM registration. This can cause runtime failures (e.g.,
CreateObject('WelsonJS.Toolkit')) in the launched session even though bootstrap.ps1 reports it
started successfully.
Agent Prompt
### Issue description
`-file` mode launches `cscript` via `cmd.exe` without pinning bitness. On 64-bit Windows this commonly resolves to 64-bit `cscript.exe`, which is incompatible with the x86 WelsonJS.Toolkit COM registration performed by `bootstrap.bat`.
### Issue Context
- `bootstrap.bat` registers an x86 toolkit DLL and then runs `%SystemRoot%\SysWOW64\cscript.exe`.
- User scripts and libraries may call `CreateObject("WelsonJS.Toolkit")`.
### Fix Focus Areas
- bootstrap.ps1[89-107]
- bootstrap.bat[8-13]
- bootstrap.bat[44-50]
### Suggested change
- In `-file` mode, launch `"$env:SystemRoot\SysWOW64\cscript.exe"` explicitly (or otherwise ensure 32-bit host) instead of relying on `cscript` from PATH.
- Consider also setting `-WorkingDirectory` to the extracted repo root (where `app.js` resides) for consistency with bootstrap.bat’s `pushd %~dp0` behavior.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
bootstrap.ps1 (1)
36-50: Silent failure when-file/-devis the last token.If a user invokes the script as
... -file(no value following), the($i + 1) -lt $args.Countguard fails, the flag is silently ignored, and execution falls back to the defaultbootstrap.batpath with no indication that the requested file was dropped. Same applies to a trailing-dev. Consider emitting an explicit error (or warning) when a flag is provided without its required value, e.g.:if ($arg -eq "-dev" -and ($i + 1) -lt $args.Count) { $branch = $args[$i + 1] $i++ } + elseif ($arg -eq "-dev") { + throw "-dev requires a branch name" + } elseif ($arg -eq "-file" -and ($i + 1) -lt $args.Count) { $fileArg = $args[$i + 1] $i++ } + elseif ($arg -eq "-file") { + throw "-file requires a file path" + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@bootstrap.ps1` around lines 36 - 50, The loop that parses $args in bootstrap.ps1 silently ignores a trailing "-file" or "-dev" because the ($i + 1) -lt $args.Count guard prevents capturing a missing value; update the parsing in the for loop that examines $arg to detect when "-file" or "-dev" is the last token and emit an explicit error and exit (e.g. use Write-Error/Write-Host and exit 1) instead of falling back to defaults; ensure you set $fileArg and $branch only when a value exists and add a branch that logs the missing-value error referencing the same variables/flags ($arg, $fileArg, $branch) so callers are informed when a flag is provided without a value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@bootstrap.ps1`:
- Around line 52-55: The current extension check uses -match "\." on $fileArg
which triggers for any dot anywhere in the path (e.g., "sub.dir/file"), so
change the condition to test for a real filename extension instead; update the
if that currently reads `if ($fileArg -and -not ($fileArg -match "\."))` to use
a proper extension check such as verifying
[System.IO.Path]::GetExtension($fileArg) is empty (or use a regex that matches
an extension at the end like '\.[^\\/]+$') before appending ".js" so $fileArg
only gets ".js" when it truly lacks an extension.
- Around line 103-104: The current Start-Process call invoking cmd.exe with
-ArgumentList "/k cscript `"$($app.FullName)`" `"$fileArg`"" fails for paths
with spaces because cmd.exe /k strips inner quotes; update the invocation so the
entire command after /k is wrapped in a single quoted string (e.g. "/k \"cscript
\"<path>\" \"<arg>\"\"") or, better, avoid cmd.exe entirely by calling
Start-Process directly with FilePath "cscript.exe" and Arguments built from
$app.FullName and $fileArg, or change to Set-Location to the app directory and
pass only the file name; target the Start-Process line that references cmd.exe,
$app.FullName and $fileArg.
---
Nitpick comments:
In `@bootstrap.ps1`:
- Around line 36-50: The loop that parses $args in bootstrap.ps1 silently
ignores a trailing "-file" or "-dev" because the ($i + 1) -lt $args.Count guard
prevents capturing a missing value; update the parsing in the for loop that
examines $arg to detect when "-file" or "-dev" is the last token and emit an
explicit error and exit (e.g. use Write-Error/Write-Host and exit 1) instead of
falling back to defaults; ensure you set $fileArg and $branch only when a value
exists and add a branch that logs the missing-value error referencing the same
variables/flags ($arg, $fileArg, $branch) so callers are informed when a flag is
provided without a value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| # Auto-append .js if no extension | ||
| if ($fileArg -and -not ($fileArg -match "\.")) { | ||
| $fileArg = "$fileArg.js" | ||
| } |
There was a problem hiding this comment.
Extension check matches any dot in the path, not just an extension.
$fileArg -match "\." returns true for inputs like my.app, sub.dir/test, or any path containing a dot, so .js will not be appended even when there is no real extension. Use a proper extension check instead.
Proposed fix
- # Auto-append .js if no extension
- if ($fileArg -and -not ($fileArg -match "\.")) {
- $fileArg = "$fileArg.js"
- }
+ # Auto-append .js if no extension on the file name
+ if ($fileArg -and -not [System.IO.Path]::GetExtension($fileArg)) {
+ $fileArg = "$fileArg.js"
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Auto-append .js if no extension | |
| if ($fileArg -and -not ($fileArg -match "\.")) { | |
| $fileArg = "$fileArg.js" | |
| } | |
| # Auto-append .js if no extension on the file name | |
| if ($fileArg -and -not [System.IO.Path]::GetExtension($fileArg)) { | |
| $fileArg = "$fileArg.js" | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@bootstrap.ps1` around lines 52 - 55, The current extension check uses -match
"\." on $fileArg which triggers for any dot anywhere in the path (e.g.,
"sub.dir/file"), so change the condition to test for a real filename extension
instead; update the if that currently reads `if ($fileArg -and -not ($fileArg
-match "\."))` to use a proper extension check such as verifying
[System.IO.Path]::GetExtension($fileArg) is empty (or use a regex that matches
an extension at the end like '\.[^\\/]+$') before appending ".js" so $fileArg
only gets ".js" when it truly lacks an extension.
| Start-Process "cmd.exe" ` | ||
| -ArgumentList "/k cscript `"$($app.FullName)`" `"$fileArg`"" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find . -type f -name "bootstrap.ps1" 2>/dev/nullRepository: gnh1201/welsonjs
Length of output: 75
🏁 Script executed:
cat -n bootstrap.ps1 | head -120 | tail -40Repository: gnh1201/welsonjs
Length of output: 1557
🏁 Script executed:
cat > /tmp/test_quoting.md << 'EOF'
# PowerShell Start-Process argument passing behavior
When using Start-Process with -ArgumentList, PowerShell passes arguments as a single command line string to the process. For cmd.exe /k:
1. Start-Process receives: "/k cscript `"C:\path with spaces\app.js`" `"arg with spaces`""
2. This becomes the full command line argument to cmd.exe
3. cmd.exe /k then processes this string with its own parsing rules
cmd.exe /k quoting rules (from cmd /?):
- cmd /k interprets the first unquoted string as the command to execute
- Everything after /k becomes the command line to execute
- If the command contains spaces and is NOT quoted, cmd will split at the first space
The issue: If $app.FullName contains spaces, the backtick-escaped quotes may not protect it properly
because cmd.exe receives the entire ArgumentList as a single parameter and applies its own quote parsing.
Proposed fix syntax check:
/k `"cscript `"`"$($app.FullName)`"`" `"`"$fileArg`"`"`"
This would result in nested quotes being passed to cmd.exe which could be problematic.
EOF
cat /tmp/test_quoting.mdRepository: gnh1201/welsonjs
Length of output: 1106
🏁 Script executed:
# Let me check what actual behavior occurs with Start-Process and cmd.exe argument passing
python3 << 'EOF'
# Analyze the proposed fix syntax
original = '/k cscript `"$($app.FullName)`" `"$fileArg`"'
proposed = '/k `"cscript `"`"$($app.FullName)`"`" `"`"$fileArg`"`"`"'
print("Original quoting:")
print(f" {original}")
print()
print("Proposed quoting:")
print(f" {proposed}")
print()
print("Issue analysis:")
print("- Start-Process passes -ArgumentList as a single string to cmd.exe")
print("- cmd.exe /k applies its own quote-stripping rules")
print("- Backtick escaping in PowerShell handles PowerShell parsing, not cmd.exe parsing")
print()
print("The real issue:")
print("- If $app.FullName contains spaces and cmd.exe strips/misinterprets quotes,")
print(" the command may be split incorrectly")
print("- Example: /k cscript \"C:\\Program Files\\app.js\" \"arg\"")
print(" If cmd strips outer quotes, it becomes: cscript C:\\Program Files\\app.js ...")
print(" And cmd treats 'C:\\Program' as one argument and 'Files\\app.js' as another")
EOFRepository: gnh1201/welsonjs
Length of output: 759
🌐 Web query:
PowerShell Start-Process cmd.exe ArgumentList cmd /k quoting spaces paths
💡 Result:
To start cmd.exe using PowerShell's Start-Process cmdlet with the /k switch (to execute a command and keep the window open) while properly handling paths containing spaces in ArgumentList, use embedded double-quoting with escaped quotes in PowerShell strings. Official Microsoft documentation recommends using a single string for ArgumentList when dealing with complex quoting: Start-Process -FilePath cmd.exe -ArgumentList "/k dir "%SystemDrive%\Program Files"" This passes cmd.exe /k dir "C:\Program Files" (assuming C: drive), correctly quoting the path with spaces. The "" is PowerShell's escaped double quote. For an array: Start-Process -FilePath cmd.exe -ArgumentList "/k", "dir", ""%SystemDrive%\Program Files"" Both work per docs (results 7,9,10,17 from first search; similar in second). For a custom path with spaces, e.g., $path = "C:\My Folder\script.bat": - Single string (recommended for cmd /k): Start-Process cmd.exe -ArgumentList "/k "$path"" The resulting command line is: cmd.exe /k "C:\My Folder\script.bat" - Array: Start-Process cmd.exe -ArgumentList "/k", ""$path"" Due to a longstanding Start-Process bug (GitHub #5576, mentioned in results 1,2,11), arguments with spaces must have embedded "..." in PowerShell strings using "" . For cmd /k followed by multiple commands or complex args, enclose the entire command after /k in additional quotes to avoid cmd.exe parsing bugs (result 1): "/k "dir "C:\My Folder" & pause"" Here-strings simplify multi-line: $args = @" /k dir "$env:SystemDrive\Program Files" "@ Start-Process cmd.exe -ArgumentList $args Examples tested in recent PowerShell 7.x docs (up to 7.6 as of 2026).
Citations:
- 1: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.5
- 2: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.4
- 3: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.6
- 4: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-5.1
- 5: https://stackoverflow.com/questions/79517335/powershell-start-process-with-cmd-problem-with-spaces-in-path
- 6: https://stackoverflow.com/questions/52825281/start-cmd-exe-from-powershell-with-arguments-in-a-script-block/52825448
🏁 Script executed:
python3 << 'EOF'
# Verify the proposed fix syntax against PowerShell quoting rules
original = r'/k cscript `"$($app.FullName)`" `"$fileArg`"'
proposed = r'/k `"cscript `"`"$($app.FullName)`"`" `"`"$fileArg`"`"`"'
recommended = r'/k `"cscript `"$($app.FullName)`" `"$fileArg`"`"'
print("Current code (as in bootstrap.ps1):")
print(f" -ArgumentList \"{original}\"")
print(" → cmd.exe receives: /k cscript \"...path...\" \"...arg...\"")
print()
print("Proposed fix (from review):")
print(f" -ArgumentList \"{proposed}\"")
print(" Analysis: Multiple nested backtick escapes appear to double-escape")
print()
print("Recommended fix (per cmd /k best practices):")
print(f" -ArgumentList \"{recommended}\"")
print(" → cmd.exe receives: /k \"cscript \"...path...\" \"...arg...\"\"")
print()
print("Key difference:")
print(" - Current: /k cscript ... (if path has spaces, cmd splits incorrectly)")
print(" - Recommended: /k \"cscript ...\" (entire command wrapped, cmd /k respects quotes)")
print()
print("Proposed fix assessment:")
print(" - Syntax is convoluted and may not escape correctly in PowerShell")
print(" - The extra backtick escapes don't follow standard PowerShell quoting patterns")
print(" - A simpler, cleaner fix would be the 'recommended' form above")
EOFRepository: gnh1201/welsonjs
Length of output: 975
🏁 Script executed:
# Verify the proposed syntax would even be valid PowerShell
python3 << 'EOF'
import re
# Count backtick escapes in proposed fix
proposed = r'/k `"cscript `"`"$($app.FullName)`"`" `"`"$fileArg`"`"`"'
# Each `" should become a literal " in the string
# Let's trace through what PowerShell would produce:
backtick_escaped = re.findall(r'`"', proposed)
print(f"Number of `\" sequences in proposed fix: {len(backtick_escaped)}")
print(f"Positions: {[m.start() for m in re.finditer(r'`\"', proposed)]}")
print()
print("This creates a very complex quoting pattern that may be error-prone")
print("and doesn't match standard PowerShell/cmd quoting conventions")
EOFRepository: gnh1201/welsonjs
Length of output: 306
Correct the cmd.exe /k argument quoting to handle paths with spaces.
The concern about cmd.exe /k quote-stripping is valid when $app.FullName or $fileArg contains spaces. The proper fix wraps the entire command after /k in quotes:
Proposed fix
- Start-Process "cmd.exe" `
- -ArgumentList "/k cscript `"$($app.FullName)`" `"$fileArg`""
+ Start-Process "cmd.exe" `
+ -ArgumentList "/k `"cscript `"$($app.FullName)`" `"$fileArg`"`""Alternatively, Set-Location to the app directory and pass just the file name, or invoke cscript.exe directly via Start-Process without going through cmd.exe.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Start-Process "cmd.exe" ` | |
| -ArgumentList "/k cscript `"$($app.FullName)`" `"$fileArg`"" | |
| Start-Process "cmd.exe" ` | |
| -ArgumentList "/k `"cscript `"$($app.FullName)`" `"$fileArg`"`" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@bootstrap.ps1` around lines 103 - 104, The current Start-Process call
invoking cmd.exe with -ArgumentList "/k cscript `"$($app.FullName)`"
`"$fileArg`"" fails for paths with spaces because cmd.exe /k strips inner
quotes; update the invocation so the entire command after /k is wrapped in a
single quoted string (e.g. "/k \"cscript \"<path>\" \"<arg>\"\"") or, better,
avoid cmd.exe entirely by calling Start-Process directly with FilePath
"cscript.exe" and Arguments built from $app.FullName and $fileArg, or change to
Set-Location to the app directory and pass only the file name; target the
Start-Process line that references cmd.exe, $app.FullName and $fileArg.



Update bootstrap.ps1
Summary by Sourcery
Update the PowerShell bootstrap script to support both default interactive installation and argument-driven execution of WelsonJS, including new file execution mode and clearer usage guidance.
New Features:
Enhancements:
Summary by CodeRabbit
New Features
-file <path>argument to execute custom JavaScript files. Files without a.jsextension are automatically appended.Improvements