Skip to content
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 14, 2021
1 parent 61e5ced commit 4f0f73d69d39a6eed6bbca91fdd0981e29ca6f20
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/plugins/processing/algs/grass7/ext/
@@ -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%')

0 comments on commit 4f0f73d

Please sign in to comment.