mirror of
https://github.com/unraid/api.git
synced 2026-01-04 07:29:48 -06:00
fix(connect): remove unraid-api folder before creating symlink (#1556)
During plugin installation, if `/usr/local/bin/unraid-api` exists as a directory, the installation fails because `rm -f` cannot remove a directory. This change replaces `rm -f` with `rm -rf` to ensure that the path is removed regardless of whether it is a file or a directory, allowing the symlink to be created successfully. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,7 @@ done
|
||||
chmod +x usr/local/unraid-api/dist/cli.js
|
||||
chmod +x usr/local/unraid-api/dist/main.js
|
||||
|
||||
rm -f usr/local/bin/unraid-api
|
||||
rm -rf usr/local/bin/unraid-api
|
||||
ln -sf ../unraid-api/dist/cli.js usr/local/bin/unraid-api
|
||||
# deprecated
|
||||
ln -sf ../bin/unraid-api usr/local/sbin/unraid-api
|
||||
|
||||
Reference in New Issue
Block a user