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

Running jsii-pacmak fails when on a path with a space #2748

Closed
5 tasks
ArmaanT opened this issue Mar 26, 2021 · 3 comments · Fixed by #2758
Closed
5 tasks

Running jsii-pacmak fails when on a path with a space #2748

ArmaanT opened this issue Mar 26, 2021 · 3 comments · Fixed by #2758
Assignees
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort module/pacmak Issues affecting the `jsii-pacmak` module p2

Comments

@ArmaanT
Copy link

ArmaanT commented Mar 26, 2021

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)
  • Go

General Information

  • JSII Version: 1.26.0 (build 7d76e02)
  • Platform: Ubuntu 20.04

What is the problem?

Running jsii-pacmak on a path with spaces in it will cause the command to fail. I did some quick testing and was able to solve the problem locally by wrapping the module directory in quotes here.

I can make a PR to fix this issue if the above idea makes sense.

Verbose Log

$ '/home/armaan/path/with space/node_modules/.bin/jsii-pacmak' --verbose
[jsii-pacmak] [INFO] Found 1 modules to package
[jsii-pacmak] [INFO] Packaging NPM bundles
Error: Command (npm pack /home/armaan/path/with space) failed with status 1:
#STDERR> npm ERR! code ENOLOCAL
#STDERR> npm ERR! Could not install from "../../home/armaan/path/with" as it does not contain a package.json file.
#STDERR> 
#STDERR> npm ERR! A complete log of this run can be found in:
#STDERR> npm ERR!     /home/armaan/.npm/_logs/2021-03-26T22_38_17_866Z-debug.log
#STDERR> 
#STDOUT> 
    at ChildProcess.<anonymous> (/home/armaan/path/with space/node_modules/jsii-pacmak/lib/util.js:120:27)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@ArmaanT ArmaanT added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 26, 2021
@RomainMuller RomainMuller added p2 effort/small Small work item – less than a day of effort module/pacmak Issues affecting the `jsii-pacmak` module and removed needs-triage This issue or PR still needs to be triaged. labels Mar 30, 2021
RomainMuller added a commit that referenced this issue Mar 30, 2021
Quoting the package path in the sub-shell command so that spaces are not
incorrectly interpreted as argument delimiters.

Fixes #2748
@RomainMuller
Copy link
Contributor

@all-contributors add @ArmaanT for bug

@allcontributors
Copy link
Contributor

@RomainMuller

I've put up a pull request to add @ArmaanT! 🎉

RomainMuller added a commit that referenced this issue May 27, 2021
Quoting the package path in the sub-shell command so that spaces are not
incorrectly interpreted as argument delimiters.

Fixes #2748
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort module/pacmak Issues affecting the `jsii-pacmak` module p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants