File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed
Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 11name : " Release dev container features"
22on :
33 workflow_dispatch :
4- push :
5- branches :
6- - main
74
85jobs :
96 deploy :
Original file line number Diff line number Diff line change @@ -138,12 +138,34 @@ check_packages curl ca-certificates apt-transport-https dirmngr gnupg2
138138. /etc/os-release
139139receive_gpg_keys $MISE_CLI_INSTALLER_GPG_KEY
140140
141+ # Get the directory part
142+ install_dir=$( dirname " $MISE_INSTALL_PATH " )
143+
144+ # Create a list of directories to potentially create
145+ dirs_to_create=" "
146+ current_dir=" $install_dir "
147+
148+ # Build the list of non-existent parent directories
149+ while [ ! -d " $current_dir " ] && [ " $current_dir " != " /" ] && [ " $current_dir " != " ." ]; do
150+ dirs_to_create=" $current_dir $dirs_to_create "
151+ current_dir=$( dirname " $current_dir " )
152+ done
153+
154+ # Create directories and set ownership
155+ if [ -n " $dirs_to_create " ]; then
156+ for dir in $dirs_to_create ; do
157+ mkdir -p " $dir "
158+ chown " ${_REMOTE_USER} :$( id -gn ${_REMOTE_USER} 2> /dev/null || echo ${_REMOTE_USER} ) " " $dir "
159+ echo " Created directory with correct ownership: $dir "
160+ done
161+ fi
162+
141163# Run the mise CLI installer
142164echo " Installing mise CLI..."
143165curl -s https://mise.jdx.dev/install.sh.sig | gpg --decrypt | sh
144166
145167chmod +x ${MISE_INSTALL_PATH}
146- chown ${_REMOTE_USER} ${ MISE_INSTALL_PATH}
168+ chown " ${_REMOTE_USER} : $( id -gn ${_REMOTE_USER} 2> /dev/null || echo ${_REMOTE_USER} ) " " ${ MISE_INSTALL_PATH}"
147169
148170install_mise_activate bash /etc/bash.bashrc
149171install_mise_activate zsh /etc/zsh/zshrc
You can’t perform that action at this time.
0 commit comments