Skip to content
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
3 changes: 2 additions & 1 deletion lib/mix/lib/mix/tasks/release.init.ex
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,10 @@ defmodule Mix.Tasks.Release.Init do
setlocal enabledelayedexpansion

pushd .
cd "%~dp0\.."
pushd "%~dp0\.."
set RELEASE_ROOT=%cd%
popd
popd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this popd too or can we remove it?

Suggested change
popd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know.
But seemed obvious for me that one pushd - one popd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried a little script :

cd 
pushd "c:\temp"
cd
pushd "d:\src"
cd
popd
cd
popd 

Without the second popd, I'm still in then C:\temp and not restored in the original directory where a launch it.

So I'l say Yes , we need the second too.


if not defined RELEASE_NAME (set RELEASE_NAME=<%= @release.name %>)
if not defined RELEASE_VSN (for /f "tokens=1,2" %%K in ('type "!RELEASE_ROOT!\releases\start_erl.data"') do (set ERTS_VSN=%%K) && (set RELEASE_VSN=%%L))
Expand Down
Loading