Skip to content

Commit

Permalink
[PATCH] (#5)
Browse files Browse the repository at this point in the history
At src/generators/mod.rs: cargoDir is just a dot on my MacOS Catalina + zsh.
May cause invalid un-installation.
Fixed with [os.homedir()](https://nodejs.org/api/os.html#oshomedir).
  • Loading branch information
AsherJingkongChen authored Apr 10, 2023
1 parent 10872ba commit 676b473
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generators/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ pub fn generate_installs() -> &'static str {
const fs = require("fs");
const path = require("path");
const { exec } = require("child_process");
const { homedir } = require("os");
const cargoDir = path.dirname("$HOME" + ".cargo");
const cargoDir = path.join(homedir(), ".cargo");
// check if directory exists
if (fs.existsSync(cargoDir)) {
Expand Down

0 comments on commit 676b473

Please sign in to comment.