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

Powershell support #175

Closed
Falven opened this issue Mar 24, 2021 · 5 comments · May be fixed by #176
Closed

Powershell support #175

Falven opened this issue Mar 24, 2021 · 5 comments · May be fixed by #176

Comments

@Falven
Copy link

Falven commented Mar 24, 2021

Expected Behavior

[REQUIRED] Describe expected behavior

npm run-script --silent build-app should not rely on unix commands as to stay cross-platform.

Describe the problem

'rm' is not recognized as an internal or external command,
operable program or batch file.

[REQUIRED] Actual Behavior

npm run-script --silent build-app

'rm' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @openid/[email protected] prepare: npm run-script --silent build-app
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @openid/[email protected] prepare script.

[REQUIRED] Steps to reproduce the behavior

clone the repository and run the script from a powershell environment.

[REQUIRED] Environment

  • AppAuth-JS version: 1.3.0
  • AppAuth-JS Environment (Node, Browser (UserAgent), ...): Windows 10
  • Source code snippts (inline or JSBin)
@Falven
Copy link
Author

Falven commented Mar 24, 2021

Temporary solution would be to use git for windows shell, but really it should stay cross-platform.

@tikurahul
Copy link
Collaborator

Pull requests would be greatly appreciated here.

@jeroenheijmans
Copy link

One way to solve it is with above suggested PR. Tested it on Windows 10, also ran npm test successfully after my changes, seeing all tests succeed on Windows. (I don't know much else about this repository, to be frank :D)

@tikurahul
Copy link
Collaborator

You can use WSL.

@brezelman
Copy link

Workaround:
In package.json find:

"clean": "rm -rf built"
replace by:
"clean": "rmdir /S /Q built"

or instead use this line to be compatible with unix and windows:
"clean": "(rm -rf built || rmdir /S /Q built)"

Windows users will see the rm not found error in console, but the command succeeds with the alternative command provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants