boxcutter / windows

Virtual machine templates for Windows written in legacy JSON and Batch Scripting/JScript
Apache License 2.0
753 stars 266 forks source link

Fixed script goto typo #258

Closed tommychinjr closed 3 years ago

tommychinjr commented 3 years ago

Typo in the script causes a failure in a goto statement

arizvisa commented 3 years ago

Thank you for catching this.

arizvisa commented 3 years ago

Double-checked all branches under floppy/ with:

$ grep -or 'goto [^ ]\+' *.cmd  | cut -d: -f2- | sort | uniq
goto %1
goto check_bitsadmin
goto check_curl
goto check_file_downloaded
goto check_wget
goto check_wget_bootsrapped
goto check_wget_bootstrapped
goto curl
goto download
goto _download_cmd_not_found
goto :eof
goto :exit
goto exit0
goto :exit1
goto exit1
goto floppy_curl
goto is_winrm_running
goto main
goto skip_fixnetwork
goto wget
goto winrm_not_running

and then with:

$ grep -r '^:' *.cmd | cut -d: -f2- | grep -v ^:: | sort | uniq
:bitsadmin
:check_bitsadmin
:check_copyfile
:check_curl
:check_file_downloaded
:check_fileexists
:check_powershell
:check_wget
:check_wget_bootstrapped
:copyfile
:curl
:download
:_download_cmd_not_found
:exit
:exit0
:exit1
:find_tee
:floppy_curl
:is_winrm_running
:main
:output_debug_info
:powershell
:skip_fixnetwork
:wget
:winrm_not_running

and it looks like there's another busted label, ":eof", that'll need to be fixed too.

Anyways, merging this...

tommychinjr commented 3 years ago

Thanks for merging the fix and appreciate the quick response!

arizvisa commented 3 years ago

got you. I appreciate the contribution.