Skip to content

Commit

Permalink
Ensured Windows script fail on non-supported Python #48
Browse files Browse the repository at this point in the history
  • Loading branch information
pombredanne authored and jdaguil committed Nov 24, 2015
1 parent 804dd42 commit a33a5f5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@ if not exist "c:\python27\python.exe" (
echo(
echo https://www.python.org/ftp/python/2.7.10/python-2.7.10.msi
echo(
goto EOS
exit /b 1
)

call c:\python27\python.exe etc/configure.py %SCANCODE_CLI_ARGS%
if %errorlevel% neq 0 (
exit /b %errorlevel%
)
if exist bin\activate (
bin\activate
)
Expand Down
2 changes: 1 addition & 1 deletion etc/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def unsupported():
print('Unsupported OS/platform.')
print('See https://github.com/nexB/scancode-toolkit/ for supported OS/platforms.')
print('Enter a ticket https://github.com/nexB/scancode-toolkit/issues asking for your OS/platform combo.')
print('Enter a ticket https://github.com/nexB/scancode-toolkit/issues asking for support of your OS/platform combo.')
sys.exit(1)

if sys.maxsize > 2 ** 32:
Expand Down
3 changes: 3 additions & 0 deletions extractcode.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ goto scancode
echo * Configuring ScanCode ...
set CONFIGURE_QUIET=1
call %SCANCODE_ROOT_DIR%\configure etc/conf
if %errorlevel% neq 0 (
exit /b %errorlevel%
)

:scancode
%SCANCODE_ROOT_DIR%\bin\extractcode %SCANCODE_CMD_LINE_ARGS%
Expand Down
3 changes: 3 additions & 0 deletions scancode.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ goto scancode
echo * Configuring ScanCode ...
set CONFIGURE_QUIET=1
call %SCANCODE_ROOT_DIR%\configure etc/conf
if %errorlevel% neq 0 (
exit /b %errorlevel%
)

:scancode
%SCANCODE_ROOT_DIR%\bin\scancode %SCANCODE_CMD_LINE_ARGS%
Expand Down

0 comments on commit a33a5f5

Please sign in to comment.