Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 14, 2021
1 parent 61e5ced commit 4f0f73d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/ext/r_proj.py
Expand Up @@ -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:
Expand Down

0 comments on commit 4f0f73d

Please sign in to comment.