Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bash profile command breaks pub in Dart Editor #17127

Closed
DartBot opened this Issue Feb 26, 2014 · 9 comments

Comments

Projects
None yet
5 participants
Member

DartBot commented Feb 26, 2014

This issue was originally filed by smerzlia...@gmail.com


It seems that the Dart Editor is accessing may bash profile config in .bash_profile
 
Did this on my Mac (running Mavericks):

  1. Add CD command to the end of your ~/.bash_profile - cd /some/directory
  2. Start Dart Editor with any dart project
  3. Run pub get returns the error

serge/.bash_profile: line 55: cd: /some/directory: No such file or directory

FIX:
remove CD command from .bash_profile and retry pub get in Dart Editor - problem goes away

Member

DartBot commented Feb 26, 2014

This comment was originally written by sme...@gmail.com


Sorry not quite accurate. here is a better process:

  1. Add CD command to the end of your ~/.bash_profile - cd /some/existing/directory
  2. Start Dart Editor with any dart project
  3. Run pub build returns the error

--- 26/02/2014 11:52:28 AM Running pub build ... ---
Pub build failed, [1] Error in pubspec.yaml:
Could not find a file named "pubspec.yaml" in "/some/existing/directory".

FIX:
1.remove CD command from .bash_profile
2. restart Dart Editor
3. retry pub build in Dart Editor - build works as usual

Member

DartBot commented Feb 26, 2014

This comment was originally written by sme...@gmail.com


command line pub commands work fine

Member

DartBot commented Feb 26, 2014

This comment was originally written by smer...@gmail.com


God I am stupid today. Apologies:

  • Dart Editor 1.1.3 (build 31822)
  • Mac OSX mavericks
Member

sethladd commented Feb 27, 2014

Added Area-Editor, Triaged labels.

Set owner to @keertip.
Added this to the 1.3 milestone.
Removed Priority-Unassigned label.
Added Priority-Medium label.

Contributor

keertip commented Mar 5, 2014

@smerzlia,

The editor shells out and calls pub build. When it does, it sets the working directory to the project. But if you have a "cd" into some directory at the end of your shell script, that then becomes the working dir and pub cannot find a pubspec in there. Is there a reason to do a cd in your bash profile?

Member

DartBot commented Mar 5, 2014

This comment was originally written by smerz...@gmail.com


Not really. I only do it occasionally, to get new terminals to open in a particular directory.

clayberg commented Apr 9, 2014

Removed this from the 1.3 milestone.
Added this to the 1.4 milestone.

Contributor

keertip commented Apr 17, 2014

@smerzlia,

The workaround here would be to remove the cd command from bash profile. The editor cannot do much in this situation as it has no control over user's terminal settings.


Added WontFix label.

@DartBot DartBot added this to the 1.4 milestone Apr 17, 2014

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment