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

Nar created from TypeScript can't reference files in the same folder #137

Open
achew22 opened this issue May 4, 2016 · 1 comment
Open
Labels

Comments

@achew22
Copy link

achew22 commented May 4, 2016

Reproduction steps:

cd /tmp
git clone https://github.com/Microsoft/TypeScript.git
cd TypeScript
npm install nar
./node_modules/nar/bin/nar create --executable
mv *.nar /tmp/typescript.nar
cd /tmp
chmod +x typescript.nar
echo "var x = function() {alert('test');}" > /tmp/test.ts

You now have everything the way I would expect it

# This will fail
cd /tmp
/tmp/typescript.nar exec --out test.js test.ts
# This will succeed
cd /tmp
/tmp/typescript.nar exec --out /tmp/test.js /tmp/test.ts

Do you have any ideas on why the cwd is being changed by nar? Is that what it should be doing?

@h2non h2non added the question label May 7, 2016
@h2non
Copy link
Owner

h2non commented May 7, 2016

nar executables are extracted into .nar folder by default in the current working directory. I would suggest using absolute paths or change the current directory programmatically as you need it.

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

No branches or pull requests

2 participants