-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: execute script relative to current working directory #323
Conversation
64cfe84
to
f54f587
Compare
Just a note for this PR: Bash works perfectly fine and as you would expect, however Javascript for example won't behave exactly as you'd expect. A workaround with node for this would be something like this Personally I am content with this, since I mostly use bash but wanted to put this out there. |
I think this is no worse than it currently is., In fact it is still better because you can do something to get the imports to work without hardcoding the presentation's path, which you couldn't before. Thanks! |
Wait I think the current directory shouldn't be the default, it should be the base for where the presentation is. This assumes your cwd is the same as where the presentation is but that's not necessarily the case. This base oath is passed around, but not sure if it's accessible from here. We can merge this as is and I can look at it afterwards otherwise (still need the c and c++ changes before merging). |
Will look into it this evening. As for the cwd being the presentation path: I was thinking about that too but a lot of applications behave like this so I didn't go through with it. But I think you're right, it would probably be best to take the path where the slides themselves are located. |
6c3cc56
to
87687d6
Compare
I resolved both of these. |
Looks like |
@mfontanini, yes---I found that I had to specifically override the repo directory to use nightly ( |
Not sure about that. There's a way to set the project to build on nightly but you don't really want to enforce that, all you need is the |
You can create a toolchain file: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file |
That's the thing, it doesn't require nightly to build. It needs nightly to be formatted. I've used a toolchain file but to specify it needs to build with it. I don't know if running |
Yeah sorry, misread it. From quick search online it indeed doesn't seem possible to only enforce fmt. But I do think the toolchain file makes all cargo/rust commands use that toolchain, would need to test it though. |
But why would you not just use the same toolchain to build with as well as format with? Seems it would just be easier that way to match? |
Intends to fix #322
I mostly just quickly wrote something so it would work for my use-case, so I didn't test all languages.