Skip to content

Escape arguments when installer invokes commands#652

Merged
psihius merged 2 commits intoclusterio:masterfrom
Hornwitser:fix-installer-breaking-on-space
Sep 2, 2024
Merged

Escape arguments when installer invokes commands#652
psihius merged 2 commits intoclusterio:masterfrom
Hornwitser:fix-installer-breaking-on-space

Conversation

@Hornwitser
Copy link
Copy Markdown
Member

@Hornwitser Hornwitser commented Aug 29, 2024

The usage of shell: true means that no escaping is done on the arguments passed to the commands invoked by the installer. This leads to the installation failing if the user for example puts a space in the username for the admin account.

Fix by escaping the arguments passed on command lines. This is unreasonably complicated on Windows 😡.

Resolves #620.

The usage of shell: true means that no escaping is done on the arguments
passed to the commands invoked by the installer. This leads to the
installation failing if the user for example puts a space in the
username for the admin account.

Fix by escaping the arguments passed on command lines. This is
unreasonably complicated on Windows 😡.
The @swc/core module depends on optional dependencies being installed in
order to get the correct native binding's package installed.  Remove
--no-optional flag passed to pnpm to install these.
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 18.51852% with 22 lines in your changes missing coverage. Please review.

Project coverage is 76.87%. Comparing base (660af75) to head (0cd24d1).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
packages/create/escape_arg.js 18.51% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #652      +/-   ##
==========================================
- Coverage   77.00%   76.87%   -0.13%     
==========================================
  Files         106      107       +1     
  Lines       10072    10099      +27     
  Branches     1671     1671              
==========================================
+ Hits         7756     7764       +8     
- Misses       1792     1812      +20     
+ Partials      524      523       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@psihius psihius merged commit b69db08 into clusterio:master Sep 2, 2024
Hornwitser added a commit that referenced this pull request Sep 2, 2024
@Hornwitser Hornwitser deleted the fix-installer-breaking-on-space branch March 18, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Factorio path on create host does not support spaces

3 participants