mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-10 23:14:35 +08:00
Fix release cookie on Windows (#2012)
This commit is contained in:
parent
a73cea19cc
commit
4899767673
2 changed files with 4 additions and 2 deletions
|
@ -13,7 +13,8 @@ set PATH=!RELEASE_ROOT!\vendor\otp\erts-<%= @release.erts_version%>\bin;!RELEASE
|
|||
set cookie_path=!RELEASE_ROOT!\releases\COOKIE
|
||||
if not exist %cookie_path% (
|
||||
for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
|
||||
echo cookie-!TIMESTAMP:~0,11!-!RANDOM! > %cookie_path%
|
||||
:: '| set /p=""' is so that we don't add ' \r\n' to the cookie
|
||||
echo | set /p="cookie-!TIMESTAMP:~0,11!-!RANDOM!" > %cookie_path%
|
||||
)
|
||||
|
||||
cd !HOMEDRIVE!!HOMEPATH!
|
||||
|
|
|
@ -7,6 +7,7 @@ set cookie_path="!RELEASE_ROOT!\releases\COOKIE"
|
|||
if not exist %cookie_path% (
|
||||
if not defined RELEASE_COOKIE (
|
||||
for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
|
||||
echo cookie-!TIMESTAMP:~0,11!-!RANDOM! > %cookie_path%
|
||||
:: '| set /p=""' is so that we don't add ' \r\n' to the cookie
|
||||
echo | set /p="cookie-!TIMESTAMP:~0,11!-!RANDOM!" > %cookie_path%
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue