Skip to content

Commit

Permalink
Escape windows path
Browse files Browse the repository at this point in the history
  • Loading branch information
PEZ committed Nov 18, 2023
1 parent 0925e94 commit b53ea40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/joyride/getting_started.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
(vscode/window.showInformationMessage (str "Updating deps edn: " deps-uri))
(p/let [buffer+ (vscode/workspace.fs.readFile deps-uri)
old-deps-content (-> (js/TextDecoder. "utf-8") (.decode buffer+))
new-deps-content (string/replace-first old-deps-content "-JOYRIDE-USER-CONFIG-PATH-" (conf/user-abs-joyride-path))
user-path (-> (conf/user-abs-joyride-path) (string/escape {"\\" "\\\\"}))
new-deps-content (string/replace-first old-deps-content "-JOYRIDE-USER-CONFIG-PATH-" user-path)
new-buffer (-> (js/TextEncoder. "utf-8") (.encode new-deps-content))
_ (vscode/workspace.fs.writeFile deps-uri new-buffer)]
deps-uri))
Expand Down

0 comments on commit b53ea40

Please sign in to comment.