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

test/run script replaces PATH #116

Closed
gopherbot opened this issue Nov 12, 2009 · 2 comments
Closed

test/run script replaces PATH #116

gopherbot opened this issue Nov 12, 2009 · 2 comments

Comments

@gopherbot
Copy link

by abryzak:

The test/run shell script replaces the entire path on line 35 rather than 
supplementing it. This causes the test script to fail outputting results if 
some environment variables are set that alter behaviour of standard 
commands and the system ones don't support the options.

What steps will reproduce the problem?
1. Install latest GNU grep using macports
2. Export GREP_OPTIONS='--exclude-dir=\.svn' (I have this in my 
.bash_profile)
3. Run test/run

What is the expected output? What do you see instead?
I expect (according to installation instructions):
--- cd ../test
N known bugs; 0 unexpected bugs

I see:
grep: unrecognized option `--exclude-dir=.svn'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

What is your $GOOS?  $GOARCH?
darwin/amd64

Which revision are you sync'ed to?  (hg log -l 1)
3975:b51fd2d6c160

Please provide any additional information below.
I could just change my environment variables to avoid this problem but I 
feel the test script should either adjust the PATH rather than replace it, or 
reset the environment to a known state.

Attachments:

  1. path-adjusted.patch (316 bytes)
@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 1:

The reason for replacing the $PATH is to make sure that "." is not
in the path and that the standard binaries are being run rather
than whatever is in people's home directories, so this is basically
working as intended.
I'll clear GREP_OPTIONS though.

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

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 2:

This issue was closed by revision f3a9729.

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

2 participants