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
@DartBot

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

@DartBot

This comment has been minimized.

Show comment Hide comment
@DartBot

DartBot 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

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

@DartBot

This comment has been minimized.

Show comment Hide comment
@DartBot

DartBot Feb 26, 2014

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


command line pub commands work fine

DartBot commented Feb 26, 2014

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


command line pub commands work fine

@DartBot

This comment has been minimized.

Show comment Hide comment
@DartBot

DartBot 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

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
@sethladd

This comment has been minimized.

Show comment Hide comment
@sethladd

sethladd Feb 27, 2014

Member

Added Area-Editor, Triaged labels.

Member

sethladd commented Feb 27, 2014

Added Area-Editor, Triaged labels.

@clayberg

This comment has been minimized.

Show comment Hide comment
@clayberg

clayberg Feb 27, 2014

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

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

@keertip

This comment has been minimized.

Show comment Hide comment
@keertip

keertip Mar 5, 2014

Contributor

@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?

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?

@DartBot

This comment has been minimized.

Show comment Hide comment
@DartBot

DartBot 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.

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

This comment has been minimized.

Show comment Hide comment
@clayberg

clayberg Apr 9, 2014

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

clayberg commented Apr 9, 2014

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

@keertip

This comment has been minimized.

Show comment Hide comment
@keertip

keertip Apr 17, 2014

Contributor

@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.

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.

This issue was closed.

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