-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Can't run dart command line script using a symlink #16212
Comments
This comment was originally written by @zoechi A workaround I use now is to create a bash script named 'testscript' in the same directory as testscript.dart and link to this script instead I lookup the current directory of the bash script and start the dart script #!/bin/bash SOURCE="${BASH_SOURCE[0]}" ${DIR}/${ME}.dart ${BASH_SOURCE[0]} I think this should all be easier. |
Set owner to @rmacnak-google. |
This comment was originally written by @seaneagan I believe this is solved by issue #18538. Instead of symlinking, you would "globally install" the package (if you want a path package, see issue #19902), and then call "pub global run <package>:<script>" (see issue #19863) or create a shell script which does that, probably using issue #18539. |
This comment was originally written by @zoechi You are right, this is the global strategy ;-) |
I believe package maps are expected to address this. |
This issue was originally filed by @zoechi
What steps will reproduce the problem?
1.
I created a symlink in /usr/bin to /home/myuser/dart/scripts/bin/testscript.dart
2.
Unable to open file: /usr/bin/packages/args/args.dart'file:///usr/bin/testscript': error: line 4 pos 1: library handler failed
import 'package:args/args.dart' show ArgParser;
3.
What is the expected output? What do you see instead?
I think this should work to make Dart a convenient language for batch scripts.
What version of the product are you using? On what operating system?
Dart VM version: 1.2.0-dev.1.0 (Fri Jan 17 19:12:36 2014) on "linux_x64"
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: