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

$BIN/dart2js, $BIN/pub in SDK do not support symbolic link #3402

Closed
DartBot opened this issue Jun 6, 2012 · 10 comments
Closed

$BIN/dart2js, $BIN/pub in SDK do not support symbolic link #3402

DartBot opened this issue Jun 6, 2012 · 10 comments
Assignees

Comments

@DartBot
Copy link

DartBot commented Jun 6, 2012

This issue was originally filed by @jinmingjian


$BIN/dart2js, $BIN/pub in SDK are shell scripts in fact. But the dirname $0 does not support symbolic link way.

how about:
BIN_DIR=dirname $0
->
BIN_DIR=dirname $(readlink -f $0)

it works in my arch:)

@dgrove
Copy link
Contributor

dgrove commented Jun 11, 2012

Set owner to @dgrove.
Added this to the M1 milestone.
Added Area-Build, Triaged labels.

@dgrove
Copy link
Contributor

dgrove commented Sep 28, 2012

Fixed in r13030.


Added Fixed label.

@peter-ahe-google
Copy link
Contributor

I don't believe we have fixed this problem yet.

If you have a link from /a/b/c/d/e/f to /opt/dart-sdk/bin/dart2js, dirname of a/b/c/d/e/f will return /a/b/c/d/e. That's not where the Dart SDK is.

I think this will work:

PROG_NAME="${BASH_SOURCE[0]}"
while [ -h "${PROG_NAME}" ]; do
  PROG_NAME="$(readlink "${PROG_NAME}")"
done
BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"


Set owner to @peter-ahe-google.
Removed this from the M1 milestone.
Added this to the M2 milestone.
Removed Area-Build label.
Added Area-Dart2JS, Triaged labels.

@peter-ahe-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Low label.

@peter-ahe-google
Copy link
Contributor

Removed this from the M2 milestone.
Added this to the Later milestone.
Removed Priority-Low label.
Added Priority-Medium label.

@kasperl
Copy link

kasperl commented May 23, 2013

Added TriageForM5 label.

@kasperl
Copy link

kasperl commented May 28, 2013

Removed TriageForM5 label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@sigmundch
Copy link
Member

Peter - let me know if it is not the case, but I believe this was fixed in r30287


Added Fixed label.

copybara-service bot pushed a commit that referenced this issue May 4, 2022
Changes:
```
> git log --format="%C(auto) %h %s" a949b32..6068f47
 https://dart.googlesource.com/pub.git/+/6068f47c Fixing link example "User-Agent" (#3400)
 https://dart.googlesource.com/pub.git/+/cd0d6992 Make tests more agnostic to the test environment (#3402)
 https://dart.googlesource.com/pub.git/+/1f8db828 Fix retrieval of name in `pub global activate -sgit` (#3407)
 https://dart.googlesource.com/pub.git/+/ed63f212 Limit the number of concurrent precompilations (#3396)
 https://dart.googlesource.com/pub.git/+/d82f80a5 Fix crash when checking code with bad import (#3392)
 https://dart.googlesource.com/pub.git/+/b9ae624e Relative urls in lockfile for git urls (#3385)
 https://dart.googlesource.com/pub.git/+/62bb2440 Fix `dependency_services apply` for packages with relative imports (#3374)

```

Diff: https://dart.googlesource.com/pub.git/+/a949b329b1b51f5f3973a790e0a0a45897d837de~..6068f47c264ef790e16411b31b2c94ad6beb1ab6/
Change-Id: Ib18c2647e27a34d84005214b844351f314698611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243321
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Sarah Zakarias <zarah@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants