diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 3f5b5f1de0853e2a60623bb2b44af82ee6e42159..0ac0764217f7faeb57d0f42704cfdf5e0e8fe80a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -24,21 +24,12 @@ apps: plugs: - network - system-observe - - historyfile taosdemo: command: usr/bin/taosdemo plugs: - network -plugs: - historyfile: - interface: personal-files - read: - - $HOME/.taos_history - write: - - $HOME/.taos_history - parts: script: plugin: dump @@ -101,8 +92,3 @@ layout: bind: $SNAP_DATA/var/log/taos /etc/taos: bind: $SNAP_DATA/etc/taos - - -hooks: - install: - plugs: [historyfile] diff --git a/src/kit/shell/src/shellLinux.c b/src/kit/shell/src/shellLinux.c index 6c09d5c9d06c1182bdd45b04fec551d8ecf99e4d..69bab44985c242db27ddc4666ef5400fee481e55 100644 --- a/src/kit/shell/src/shellLinux.c +++ b/src/kit/shell/src/shellLinux.c @@ -409,7 +409,7 @@ void set_terminal_mode() { } } -void get_history_path(char *history) { sprintf(history, "%s/%s", getpwuid(getuid())->pw_dir, HISTORY_FILE); } +void get_history_path(char *history) { sprintf(history, "%s/%s", getenv("HOME"), HISTORY_FILE); } void clearScreen(int ecmd_pos, int cursor_pos) { struct winsize w;