aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fs_write.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-08-17 12:40:32 +0800
committerGitHub <noreply@github.com>2024-08-17 12:40:32 +0800
commit760ea38fed35ed12b431faa538f4ed6269a1c174 (patch)
tree23e9bace88b0f59133ee4303c7103c71f62f87af /tools/fs_write.sh
parenta53ca4fda2760cdf60d572daad8fd631f41b5a9a (diff)
downloadllm-functions-docker-760ea38fed35ed12b431faa538f4ed6269a1c174.tar.gz
refactor: improve `fs_*` (#99)
improve `_guard_path` to use `realpath -m <path>` to get absolute path
Diffstat (limited to 'tools/fs_write.sh')
-rwxr-xr-xtools/fs_write.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fs_write.sh b/tools/fs_write.sh
index 59ee812..b37a2d5 100755
--- a/tools/fs_write.sh
+++ b/tools/fs_write.sh
@@ -17,7 +17,7 @@ main() {
}
_guard_path() {
- path="$(realpath "$1")"
+ path="$(realpath -m "$1")"
action="$2"
if [[ ! "$path" == "$(pwd)"* ]]; then
if [ -t 1 ]; then