You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Release v3.5 - Fix interactive prompts via Array Strategy
Resolves a regression where push/pull confirmation prompts were being skipped.
**The Fix:**
* Refactored the file iteration logic in `push` and `pull` commands.
* Previously, the `while read` loop consumed `stdin`, preventing the `confirm()` function from reading user input during `[y/N]` prompts.
* Now loads the target file list into an array first, freeing up `stdin` for interactive prompts.
**Changes:**
* refactor: Implement "Array Strategy" for file processing to avoid FD conflicts.
* fix: Ensure `read -p` works correctly in Zsh/Bash strict modes.
* chore: Bump version to 3.5.
|**config token**|`dfsync config token`| Update your GitHub Access Token. |
139
-
|**config path**|`dfsync config path`| Change the location of the `dfsync.json` file. |
140
-
|**help**|`dfsync help`| Show usage guide. |
144
+
'''
145
+
> **Note:** Backward compatibility with older config schemas (`dotFilePaths`, `gistId`) is built-in.
141
146
142
147
---
143
148
144
149
## 🧠 Deep Dive
145
150
146
151
### Security Model
147
-
Unlike tools that store API tokens in plain text (`~/.npmrc`, `~/.git-credentials`), dotfilesync prioritizes security.
148
-
149
152
***macOS:** Uses the native **Keychain** (Service: `dotfilesync`). The token is encrypted and only accessible when your Mac is unlocked.
150
-
***Linux:** Stores the token in `~/.dfsync_token` with strict `600`permissions (read/write only by the owner).
153
+
***Linux:** Stores the token in `~/.dfsync_token`. The script enforces `chmod 600`on this file, meaning no other user on the system can read it.
151
154
152
155
### The "Flattening" Strategy
153
-
GitHub Gists do not support folders—they are flat lists of files. To support deep directory structures (like `~/.config/nvim/init.lua`), dotfilesync "flattens" filenames during upload using a double underscore delimiter (`__`).
154
-
156
+
GitHub Gists do not support folders. To support deep directory structures (like `~/.config/nvim/init.lua`), dotfilesync "flattens" filenames during upload using a double underscore delimiter (`__`).
155
157
***Local:**`~/.config/nvim/init.lua`
156
158
***Gist:**`_config__nvim__init.lua`
157
159
158
-
When you `pull`, the script intelligently reverses this transformation to restore files to their correct folders.
159
-
160
160
---
161
161
162
162
## ❓ Troubleshooting
@@ -167,8 +167,11 @@ The script depends on `jq` to parse JSON. Install it via Homebrew (`brew install
167
167
**"Token not found"**
168
168
If you upgraded from v1, run `dfsync config token <paste_token>` to migrate your token to the new secure storage.
169
169
170
-
**"404 Not Found" during Push**
171
-
Ensure your GitHub Token has the **`gist`** scope enabled. If the token is invalid, generate a new one and update it using `dfsync config token`.
170
+
**Script crashes or weird errors?**
171
+
Run with verbose mode to see exactly what's happening:
0 commit comments