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

Bash profile command breaks pub in Dart Editor #17127

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

Bash profile command breaks pub in Dart Editor #17127

DartBot opened this issue Feb 26, 2014 · 9 comments
Assignees
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue
Milestone

Comments

@DartBot
Copy link

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
Copy link
Author

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
Copy link
Author

DartBot commented Feb 26, 2014

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


command line pub commands work fine

@DartBot
Copy link
Author

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
Copy link
Contributor

Added Area-Editor, Triaged labels.

@clayberg
Copy link

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

@keertip
Copy link
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
Copy link
Author

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
Copy link

clayberg commented Apr 9, 2014

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

@keertip
Copy link
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
@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue and removed resolution-wont_fix labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue
Projects
None yet
Development

No branches or pull requests

5 participants