mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-06 12:11:33 +00:00
✨ Add support for setting the default configuration path
This commit is contained in:
parent
97c35599ad
commit
35cad4b5fd
4 changed files with 37 additions and 12 deletions
|
@ -3,6 +3,7 @@
|
|||
# Home Assistant Community Add-on: Visual Studio Code
|
||||
# Sets up code-server.
|
||||
# ==============================================================================
|
||||
declare config_path
|
||||
|
||||
# List of previous config hashes, to allow upgrade "default" configs.
|
||||
readonly -a PREVIOUS_DEFAULT_CONFIG_HASHES=(
|
||||
|
@ -16,6 +17,13 @@ readonly -a PREVIOUS_DEFAULT_CONFIG_HASHES=(
|
|||
08d86c84a0d80720b22712e878963e90cbb34b659330dad8a823f3c5c7f0ae043d197a5e3020dd7ab4fda3625e17f794675ec074984951e7107db2488898a8d0
|
||||
)
|
||||
|
||||
if bashio::config.has_value 'config_path'; then
|
||||
config_path=$(bashio::config 'config_path')
|
||||
if ! bashio::fs.directory_exists "${config_path}"; then
|
||||
bashio::exit.nok "Configured config path does not exists"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Ensure persistent data folder exists.
|
||||
if ! bashio::fs.directory_exists '/data/vscode'; then
|
||||
mkdir -p /data/vscode/extensions \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue