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 7, 2021
1 parent 3c7e380 commit 80ba560d2f85c00a477c168eb10ad80c9604a86b
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 80ba560

Please sign in to comment.