Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt user if they wish to restore changes #1137

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion update_to_latest.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,18 @@ IF "%v_conda_path%"=="" (
echo Stashing local changes and pulling latest update...
call git stash
call git pull
echo If you want to restore changes you made before updating, run "git stash pop".
set /P restore="Do you want to restore changes you made before updating? (Y/N): "
IF "%restore%" == "N" (
echo Removing changes please wait...
call git stash drop
echo Changes removed, press any key to continue...
pause >nul
) ELSE IF "%restore%" == "Y" (
echo Restoring changes, please wait...
call git stash pop --quiet
echo Changes restored, press any key to continue...
pause >nul
)
call "%v_conda_path%\Scripts\activate.bat"

for /f "delims=" %%a in ('git log -1 --format^="%%H" -- environment.yaml') DO set v_cur_hash=%%a
Expand Down