mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 02:31:34 +00:00
devenv
This commit is contained in:
parent
094802b275
commit
29a56f36d8
2 changed files with 8 additions and 5 deletions
|
@ -21,7 +21,6 @@ hassio_role: manager
|
|||
homeassistant_api: true
|
||||
privileged:
|
||||
- SYS_ADMIN
|
||||
full_access: true
|
||||
map:
|
||||
- backup:rw
|
||||
- data:rw
|
||||
|
|
|
@ -43,9 +43,8 @@ run() {
|
|||
setup_clean_view() {
|
||||
# Links some common directories to the user's home folder for convenience
|
||||
for dir in "${DIRECTORIES[@]}"; do
|
||||
if [ -e /"${dir}" ]; then
|
||||
current="${CODE_SERVER_WORKSPACE_DIR}"/"${dir}"
|
||||
|
||||
current="${CODE_SERVER_WORKSPACE_DIR}"/"${dir}"
|
||||
if [ -e /"${dir}" ]; then
|
||||
if [ ! -e "${current}" ]; then
|
||||
bashio::log.warning "Creating link for: ${dir}..."
|
||||
ln -sn "/${dir}" "$current" ||
|
||||
|
@ -59,7 +58,12 @@ setup_clean_view() {
|
|||
bashio::log.info "${dir} has good link."
|
||||
fi
|
||||
else
|
||||
bashio::log.warning "${dir} does not exist, cannot link..."
|
||||
if [ -e "${current}" ]; then
|
||||
rm "${current}"
|
||||
bashio::log.warning "${dir} does not exist, cannot link, removed existing link..."
|
||||
else
|
||||
bashio::log.warning "${dir} does not exist, cannot link..."
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue