-
Notifications
You must be signed in to change notification settings - Fork 1.5k
root-config fails if spaces are part of ROOTSYS path #10759
Copy link
Copy link
Closed
Labels
Description
- Checked for duplicates
Describe the bug
The root-config script fails in several ways when located in a PATH containing spaces.
Expected behavior
No errors when there are spaces in the path.
To Reproduce
mkdir foo\ bar
cd foo\ bar
wget https://root.cern/download/root_v6.26.04.Linux-ubuntu18-x86_64-gcc7.5.tar.gz
tar xf root_v6.26.04.Linux-ubuntu18-x86_64-gcc7.5.tar.gz
source root/bin/thisroot.sh
/home/me/foo bar/root/bin/root-config: line 26: [: too many arguments
/home/me/foo bar/root/bin/root-config: line 26: [: too many arguments
/home/me/foo bar/root/bin/root-config: line 31: [: too many arguments
It also affects other output (as expected):
$ root-config --incdir
/home/me/foo bar/root/bin/root-config: line 26: [: too many arguments
/home/me/foo bar/root/bin/root-config: line 26: [: too many arguments
/home/me/foo bar/root/bin/root-config: line 31: [: too many arguments
/home/me ./include
and:
$ root-config --version
/home/me/foo bar/root/bin/root-config: line 26: [: too many arguments
/home/me/foo bar/root/bin/root-config: line 26: [: too many arguments
/home/me/foo bar/root/bin/root-config: line 31: [: too many arguments
/home/me/foo bar/root/bin/root-config: line 553: test: /home/me: binary operator expected
cannot read /home/me
./include/RVersion.h
Setup
- ROOT: versions: seen with 6.14, 6.26, likely others
- Operating system: any Linux-based system (seen with Ubuntu in WSL, Gentoo)
Additional context
While spaces in paths are always nasty, this case was reported by a student of mine (who extracted the tarball in a subdirectory with spaces).
Reactions are currently unavailable