withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.06k stars 63 forks source link

fig settings dotfile doesn't respect symlinked dotfile #693

Open dannysteenman opened 2 years ago

dannysteenman commented 2 years ago

Sanity checks

Issue Details

Description:

Please include a detailed description of the issue (and an image or screen recording, if applicable)

I manage my dotfiles in github through a separate folder. So I symlink my dotfiles in my home directory. For fig I've symlinked the file settings.json

~/.fig
➜ l
Permissions Size User      Date Modified Name
drwxr-xr-x@    - danny 11 Dec 13:11  apps
drwxr-xr-x@    - danny 11 Dec 13:11  autocomplete
.rw-r--r--@  399 danny 11 Dec 13:11  autocomplete_actions.json
drwxr-xr-x     - danny 11 Dec 13:11  bin
.rw-r--r--@ 3.3k danny 11 Dec 13:11  CODE_OF_CONDUCT.md
.rw-r--r--@ 2.1k danny 11 Dec 13:11  CONTRIBUTING.md
.rwxr-xr-x@ 1.0k danny 11 Dec 13:11  fig.sh
.rw-r-----  2.4k danny 11 Dec 13:12  fig.sh.zwc
.rw-r--r--  1.3k danny 11 Dec 13:15  history
.rw-r--r--@ 1.1k danny 11 Dec 13:11  LICENSE
drwxr-xr-x     - danny 11 Dec 13:12  logs
.rw-r--r--@ 1.8k danny 11 Dec 13:11  README.md
lrwxr-xr-x    51 danny 11 Dec 13:15  settings.json -> /Users/danny/Github/dotfiles/.fig/settings.json
drwxr-xr-x@    - danny 11 Dec 13:12  shell
.rw-r--r--@  114 danny 11 Dec 13:11  ssh
drwxr-xr-x@    - danny 11 Dec 13:11  team
drwxr-xr-x@    - danny 11 Dec 13:11  themes
.rw-r--r--@  350 danny 11 Dec 13:11  tmux
drwxr-xr-x@    - danny 11 Dec 13:15  tools
drwxr-xr-x@    - danny 11 Dec 13:12  user
drwxr-xr-x     - danny 11 Dec 13:11  zle

But if I make new changes e.g. through the settings in the macos app, then instead of updating the file it removes the symlink settings.json -> /Users/danny/Github/dotfiles/.fig/settings.json and replaces it with a new file:

~/.fig
➜ l
Permissions Size User      Date Modified Name
drwxr-xr-x@    - danny 11 Dec 13:11  apps
drwxr-xr-x@    - danny 11 Dec 13:11  autocomplete
.rw-r--r--@  399 danny 11 Dec 13:11  autocomplete_actions.json
drwxr-xr-x     - danny 11 Dec 13:11  bin
.rw-r--r--@ 3.3k danny 11 Dec 13:11  CODE_OF_CONDUCT.md
.rw-r--r--@ 2.1k danny 11 Dec 13:11  CONTRIBUTING.md
.rwxr-xr-x@ 1.0k danny 11 Dec 13:11  fig.sh
.rw-r-----  2.4k danny 11 Dec 13:12  fig.sh.zwc
.rw-r--r--  1.5k danny 11 Dec 13:15  history
.rw-r--r--@ 1.1k danny 11 Dec 13:11  LICENSE
drwxr-xr-x     - danny 11 Dec 13:12  logs
.rw-r--r--@ 1.8k danny 11 Dec 13:11  README.md
.rw-r--r--   303 danny 11 Dec 13:17  settings.json
drwxr-xr-x@    - danny 11 Dec 13:12  shell
.rw-r--r--@  114 danny 11 Dec 13:11  ssh
drwxr-xr-x@    - danny 11 Dec 13:11  team
drwxr-xr-x@    - danny 11 Dec 13:11  themes
.rw-r--r--@  350 danny 11 Dec 13:11  tmux
drwxr-xr-x@    - danny 11 Dec 13:15  tools
drwxr-xr-x@    - danny 11 Dec 13:12  user
drwxr-xr-x     - danny 11 Dec 13:11  zle

I expect fig to update the file instead of replacing it with a new settings file.

Environment

Fig Version: Version 1.0.53 (B339) [Dutch]
UserShell: /usr/local/bin/zsh
Bundle path: /Applications/Fig.app
Autocomplete: true
Settings.json: true
CLI installed: true
CLI tool path: /usr/local/bin/fig
Accessibility: true
Number of specs: 0
SSH Integration: false
Tmux Integration: false
Keybindings path: <none>
iTerm Integration: installed!
Hyper Integration: application is not present.
VSCode Integration: installed!
Docker Integration: false
Symlinked dotfiles: true
Only insert on tab: false
Installation Script: true
PseudoTerminal Path: /Users/danny/.local/bin:/usr/local/opt/python/libexec/bin:/usr/local/opt/node@16/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/danny/.fig/bin:/usr/local/opt/fzf/bin
SecureKeyboardInput: false
SecureKeyboardProcess: <none>
Current active process: /usr/local/Cellar/zsh/5.8_1/bin/zsh (11527) - /dev/ttys004
Current working directory: /Users/danny
Current window identifier: 18687/% (com.googlecode.iterm2)
Path: /Users/danny/.local/bin:/usr/local/opt/python/libexec/bin:/usr/local/opt/node@16/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/danny/.fig/bin:/usr/local/opt/fzf/bin
Fig environment variables:
  - TERM_SESSION_ID=w0t0p0:063DD2E2-BCED-41DE-B547-BFFC510BABF2
  - FIG_INTEGRATION_VERSION=5
  - FIG_TERM=1
  - FIG_TERM_VERSION=3
  - FIG_ENV_VAR=1
  - FIG_CHECKED_PROMPTS=1
mschrage commented 2 years ago

Hey @dannysteenman! Thanks for letting us know. I'll try to add this into the next release. :)

dannysteenman commented 2 years ago

Thanks @mschrage!

chrisgrieser commented 2 years ago

I noticed the very same behavior, trying to symlink my fig settings

mschrage commented 2 years ago

@chrisgrieser are you updating your settings using the fig CLI or the settings UI?

chrisgrieser commented 2 years ago

mostly via UI (which I trigger via fig settings)