GRASS_BATCH_JOB does not tolerate path with spaces
|Reported by:||marisn||Owned by:||wenzeslaus|
|Keywords:||grass.py init spaces exec GRASS_BATCH_JOB Popen shell=True||Cc:|
It is not possible to execute any GRASS_BATCH_JOB script form a path containing spaces.
Executing </home/maris/my way/gol_batch.sh>.... /bin/sh: /home/maris/my: No such file or directory
Quoting or shell escaping also doesn't work due to get_batch_job_from_env_variable checking file presence with os.access()
Workaround is to change line 1351 of grass.py to read:
proc = Popen('"' + batch_job + '"', shell=True)
As quoting of path is a delicate issue and there have been fights in other parts of GRASS with Popen, I'll better leave for more experienced GRASS Pythonists to decide if such workaround can be considered safe or more serious changes are needed.
Change History (10)
follow-up: 7 comment:6 by , 5 years ago
|Keywords:||spaces exec GRASS_BATCH_JOB Popen shell=True added|
|Milestone:||7.2.4 → 7.6.0|