Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI fails in windows for users with spaces in their username #227

Closed
IsaacTay opened this issue Nov 15, 2022 · 3 comments
Closed

CLI fails in windows for users with spaces in their username #227

IsaacTay opened this issue Nov 15, 2022 · 3 comments
Labels
A-cli Area: command line interface author-willing-to-impl The author of this issue is willing to try to implement the solution themselves. C-bug Category: bug tribble-reported This issue was reported through Tribble.

Comments

@IsaacTay
Copy link
Contributor

This issue is reporting a bug in the code of Perseus. Details of the scope will be available in issue labels.
The author described their issue as follows:

Perseus build functions fail if you have a space in your username on windows.
Known to affect perseus build/export/serve
Since perseus defaults to using the cache directory in windows, the call to "powershell -command C:\Users\First Last..." doesn't work due to the space.

The steps to reproduce this issue are as follows:

Create a windows user with a space in the username.

A minimum reproducible example is available at <>.

  • Hydration-related: false
  • The author is willing to attempt a fix: true
Tribble internal data

dHJpYmJsZS1yZXBvcnRlZCxDLWJ1ZyxBLWNsaSxhdXRob3Itd2lsbGluZy10by1pbXBs

@github-actions github-actions bot added A-cli Area: command line interface author-willing-to-impl The author of this issue is willing to try to implement the solution themselves. C-bug Category: bug tribble-reported This issue was reported through Tribble. labels Nov 15, 2022
@arctic-hen7
Copy link
Member

Well that's a problem. What's the exact error message you're getting?

@IsaacTay
Copy link
Contributor Author

 ⠄ [1/2] 📦 Exporting your app's pages...
  [2/2] 🏗️  Building your app to Wasm...❌
C:\Users\Isaac : The term 'C:\Users\Isaac' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\Users\Isaac Tay\AppData\Local\perseus\perseus_cli\cache\tools\wasm ...
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Isaac:String) [], CommandNotFoundException
  [1/2] 📦 Exporting your app's pages...✅
  [2/2] 🏗️  Building your app to Wasm...❌

It should be fixable by modifying the toolpath for window from "C:\Users..." to "& 'C:\Users...' ".
Sorry for closing the issue by accident

@IsaacTay IsaacTay reopened this Nov 16, 2022
@arctic-hen7
Copy link
Member

Then I should be able to replicate this on Linux too, so this shouldn't be too hard to fix.

IsaacTay added a commit to IsaacTay/perseus that referenced this issue Nov 17, 2022
Changes tool paths to use "& '\{tool_path}'\" so that they work on windows powershell when there are whitespaces in the directory path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: command line interface author-willing-to-impl The author of this issue is willing to try to implement the solution themselves. C-bug Category: bug tribble-reported This issue was reported through Tribble.
Projects
None yet
Development

No branches or pull requests

2 participants