visit icon indicating copy to clipboard operation
visit copied to clipboard

Launcher failure due to path names with spaces

Open griffin28 opened this issue 5 years ago • 2 comments

Describe the bug

I installed VisIt 3.10 on macOS via a downloaded binary. Since I didn't want to overwrite a previous installation, macOS renamed the package to "VisIt 2", a name with a space in it. I was then unable to start this program: it failed in the launcher. Very briefly, an error message flashed by stating something about "file not found". When I renamed the package to "VisIt-3.1.0" (without spaces), it was running fine.

I assume that your launcher is a shell script, and I assume it doesn't handle path names with spaces. For example, the line

exec $(dirname $0)/../Resources/bin/visit $* &

will not work if $0 contains spaces. Resolving this usually requires adding double quotes where necessary.

-erik

Impact

  • [ ] High - User productivity significantly degraded
  • [x] Medium - User productivity partially degraded
  • [ ] Low - User productivity trivially degraded

Likelihood

  • [ ] High - occurrence is not specific to platform, data, config, a combination of operators, queries, etc.
  • [x] Medium - neither low nor high likelihood
  • [ ] Low - occurrence is specific to combination of multiple factors such as configuration, data, platform, etc.

Desktop

  • OS and version: [macOS]
  • VisIt Version: [3.1.0]

griffin28 avatar Jan 31 '20 16:01 griffin28

Same as - #2303

griffin28 avatar Jan 31 '20 16:01 griffin28

I would also recommend changing:

exec $(dirname $0)/../Resources/bin/visit $* &

to something like:

exec $(dirname "$0")/../Resources/bin/visit "$@" &

where the quotes around "$@" are important to forward arguments properly to the binary. . https://stackoverflow.com/a/448415/104910

Regards,

Juan

griffin28 avatar Jan 31 '20 16:01 griffin28

Dup of #2303

markcmiller86 avatar Nov 17 '22 18:11 markcmiller86