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

src/pkg/deps.bash breaks build #306

Closed
gopherbot opened this issue Nov 22, 2009 · 8 comments
Closed

src/pkg/deps.bash breaks build #306

gopherbot opened this issue Nov 22, 2009 · 8 comments

Comments

@gopherbot
Copy link
Contributor

by codedr:

What steps will reproduce the problem?
1. all.bash
2.
3.

What is the expected output? What do you see instead?
Make.deps:1: *** missing separator.  Stop.

What is your $GOOS?  $GOARCH?


Which revision are you using?  (hg identify)
2f32e74ab96e+ tip

Please provide any additional information below.

in deps.bash, 'cd' produces output of the changed directory.
send the output of 'cd' to dev/null

diff -r 2f32e74ab96e src/pkg/deps.bash
--- a/src/pkg/deps.bash Sat Nov 21 15:53:03 2009 -0800
+++ b/src/pkg/deps.bash Sun Nov 22 13:50:44 2009 -0600
@@ -16,7 +16,7 @@
 dirpat=$(echo $dirs | sed 's/ /|/g; s/.*/^(&)$/')
 
 for dir in $dirs; do (
-       cd $dir || exit 1
+       cd $dir > /dev/null 2>&1 || exit 1
 
        sources=$(sed -n 's/\.go\\/.go/p' Makefile)
        sources=$(ls $sources 2> /dev/null)  # remove .s, .c, etc.
@agl
Copy link
Contributor

agl commented Nov 22, 2009

Comment 1:

What system do you have where cd produces output?

@agl
Copy link
Contributor

agl commented Nov 22, 2009

Comment 2:

Status changed to WaitingForReply.

@gopherbot
Copy link
Contributor Author

Comment 3 by pierre.pracht:

Same probleme get past it by re-setting CDPATH
$ CDPATH="" ./all.bash

@gopherbot
Copy link
Contributor Author

Comment 4 by codedr:

bash man page:
cd [-L|-P] [dir]
[...] If a non-empty directory name from CDPATH is used, or if - is the
first argument, and the directory change is  successful,  the  absolute
pathname  of  the new working directory is written to the standard output.

@rsc
Copy link
Contributor

rsc commented Nov 23, 2009

Comment 5:

But why is bash falling back to CDPATH?
That script should only be doing cd into
directories that exist as subdirectories of
the current one, so CDPATH shouldn't be
involved.
What output is it?

Owner changed to r...@golang.org.

@gopherbot
Copy link
Contributor Author

Comment 6 by benkasminbullock:

I am getting this error too. My CDPATH is set like this: CDPATH=.:$HOME:$HOME/.. , etc.
The reason to put . at the front is so that directories under the current directory 
take priority over directories elsewhere.

@gopherbot
Copy link
Contributor Author

Comment 7 by codedr:

alternative version that does not do any 'cd'.

Attachments:

  1. alt.diff (968 bytes)

@rsc
Copy link
Contributor

rsc commented Nov 25, 2009

Comment 8:

This issue was closed by revision 6c827cb.

Status changed to Fixed.

Merged into issue #-.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants