Skip to content

Commit

Permalink
Ensure binaries directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
delasy committed Feb 1, 2025
1 parent c4c99e4 commit 349e037
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/config
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ export fn getPackagesPath () str {

export fn initHome (packageAuthor := "") {
homePath := getHomePath()
binariesPath := getBinariesPath()
packagesPath := getPackagesPath()

if !fs_existsSync(homePath) {
fs_mkdirSync(homePath)
}

if !packageAuthor.empty && !fs_existsSync(packagesPath) {
if !fs_existsSync(binariesPath) {
fs_mkdirSync(binariesPath)
}

if !fs_existsSync(packagesPath) {
fs_mkdirSync(packagesPath)
}

Expand Down

0 comments on commit 349e037

Please sign in to comment.