mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
devenv
This commit is contained in:
parent
3edc1d42ad
commit
1839f5193a
2 changed files with 6 additions and 5 deletions
|
@ -22,7 +22,7 @@ readonly -a PREVIOUS_DEFAULT_CONFIG_HASHES=(
|
|||
dbe905f0935b2fea8bb5ba379bff78db9d056ea6d0965c68aa9b07938a52cbbf117186452b2b6c766aa4cf93cc3494ad91b763e8500e515e41d8cde31a3821ae
|
||||
2212babaa9dc46d38ba239052c9c05151abe517cc8b493d0d351a96bf70c1efa4f7479f6ed0b75811429ba649906eb5657d73b0732b460e718a5c66603dcdbda
|
||||
)
|
||||
DEFAULT_CONFIG_PATH="/data/vscode"
|
||||
|
||||
CODE_SERVER_CONFIG="$DEFAULT_CONFIG_PATH/config.yaml"
|
||||
|
||||
# shellcheck source=../paths.sh
|
||||
|
@ -80,10 +80,12 @@ setup_code_workspace() {
|
|||
setup_config_path() {
|
||||
# Ensure config path exists
|
||||
if bashio::config.has_value "vscode_config_path"; then
|
||||
DEFAULT_CONFIG_PATH=$(bashio::config 'vscode_config_path')
|
||||
if ! bashio::fs.directory_exists "${DEFAULT_CONFIG_PATH}"; then
|
||||
temp_path=$(bashio::config 'vscode_config_path')
|
||||
if ! bashio::fs.directory_exists "${temp_path}"; then
|
||||
bashio::exit.nok "Configured config path does not exist"
|
||||
fi
|
||||
|
||||
export CODE_SERVER_CONFIG=$temp_path
|
||||
else
|
||||
# otherwise set to local dir
|
||||
if ! bashio::fs.directory_exists "$DEFAULT_CONFIG_PATH"; then
|
||||
|
@ -92,7 +94,6 @@ setup_config_path() {
|
|||
bashio::exit.nok "Could not create persistent storage folder."
|
||||
fi
|
||||
fi
|
||||
|
||||
bashio::log.info "using code-server config path: $CODE_SERVER_CONFIG"
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# this file is to prevent spagetti paths
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
|
||||
DEFAULT_CONFIG_PATH="/data/vscode"
|
||||
readonly DEFAULT_FILES_PATH="/var/lib/code-server/defaults"
|
||||
readonly ROOT_CODE_SERVER_CONFIG_PATH="/root/.config/code-server/" # needed for code-server to cleanly
|
||||
readonly CODE_SERVER_EXTENSIONS_INSTALL_PATH="$DEFAULT_CONFIG_PATH/extensions"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue