Skip to content

Commit 23054b0

Browse files
authored
Merge pull request #2310 from Duncan-Howe/issue-1876-fix-scanning-with-percent-on-Windows
Fix for issue 1876 - Updated the batch file to replace "%" in arguments with an arbitrary …
2 parents f52ec25 + 5e41302 commit 23054b0

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ pyvenv.cfg
7979
lib64
8080
tcl
8181
/.env
82+
83+
*.orig

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Changelog
22
=========
3+
vNext
4+
-----
5+
- Updated scancode.bat to handle % signs in the arguments #1876
36

47
v20.11 (next)
58
-------------

scancode.bat

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66
set SCANCODE_ROOT_DIR=%~dp0
77
set SCANCODE_CONFIGURED_PYTHON=%SCANCODE_ROOT_DIR%Scripts\python.exe
88

9-
@rem Collect all command line arguments in a variable
10-
@rem Use a trailing space in the next line sets the variable to an empty string (rather than unseting it)
11-
set "SCANCODE_CMD_LINE_ARGS= "
12-
13-
:collectarg
14-
if ""%1""=="""" goto continue
15-
call set SCANCODE_CMD_LINE_ARGS=%SCANCODE_CMD_LINE_ARGS% %1
16-
shift
17-
goto collectarg
18-
19-
:continue
20-
219
if not exist "%SCANCODE_CONFIGURED_PYTHON%" goto configure
2210
goto scancode
2311

@@ -36,4 +24,4 @@ if %errorlevel% neq 0 (
3624
@rem without this things may not always work on Windows 10, but this makes things slower
3725
set PYTHONDONTWRITEBYTECODE=1
3826

39-
"%SCANCODE_ROOT_DIR%Scripts\scancode" %SCANCODE_CMD_LINE_ARGS%
27+
"%SCANCODE_ROOT_DIR%Scripts\scancode" %*

0 commit comments

Comments
 (0)