mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-08 14:04:31 +08:00
Allow release to boot even if it can't write (#1568)
This allows Livebook to run even from .dmg files.
This commit is contained in:
parent
3131610ad8
commit
00a7201f8a
3 changed files with 5 additions and 3 deletions
2
mix.exs
2
mix.exs
|
@ -1,7 +1,7 @@
|
|||
defmodule Livebook.MixProject do
|
||||
use Mix.Project
|
||||
|
||||
@elixir_requirement "~> 1.14.2"
|
||||
@elixir_requirement "~> 1.14.2 or ~> 1.15-dev"
|
||||
@version "0.8.0"
|
||||
@description "Interactive and collaborative code notebooks - made with Phoenix LiveView"
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ export LIVEBOOK_PORT=0
|
|||
|
||||
cookie_path="${RELEASE_ROOT}/releases/COOKIE"
|
||||
if [ ! -f $cookie_path ]; then
|
||||
cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 > $cookie_path
|
||||
RELEASE_COOKIE=$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
[[ $RELEASE_COOKIE > $cookie_path ]] || export RELEASE_COOKIE
|
||||
fi
|
||||
|
||||
cd $HOME
|
||||
|
|
|
@ -3,5 +3,6 @@ export RELEASE_MODE=interactive
|
|||
|
||||
cookie_path="${RELEASE_ROOT}/releases/COOKIE"
|
||||
if [ ! -f $cookie_path ]; then
|
||||
cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 > $cookie_path
|
||||
RELEASE_COOKIE=$(cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
|
||||
[[ $RELEASE_COOKIE > $cookie_path ]] || export RELEASE_COOKIE
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue