Skip to content
Permalink
Browse files
[processing][grass] Fix r.proj in Windows
Properly escape the equal sign in the for /f command and fix a typo in the variable name

(cherry picked from commit 57326cb)
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Jun 21, 2021
1 parent aca1a9d commit a867493fbe5b55083b964d53b50b7bdb5080c5fc
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/plugins/processing/algs/grass7/ext/r_proj.py
@@ -69,7 +69,7 @@ def processInputs(alg, parameters, context, feedback):
if isWindows():
# TODO: make some tests under a non POSIX shell
alg.commands.append('set regVar=')
alg.commands.append('for /f "delims=" %%a in (\'r.proj -g input="{}" location="{}"\') do @set theValue=%%a'.format(
alg.commands.append('for /f "delims=" %%a in (\'r.proj -g input^="{}" location^="{}"\') do @set regVar=%%a'.format(
grassName, newLocation))
alg.commands.append('g.region -a %regVar%')
else:

0 comments on commit a867493

Please sign in to comment.