Skip to content

Conversation

@mxcl
Copy link
Member

@mxcl mxcl commented Feb 5, 2024

No description provided.

@mxcl
Copy link
Member Author

mxcl commented Feb 5, 2024

don't get it

error: Uncaught (in promise) AlreadyExists: File exists (os error 17): symlink '/home/runner/.pkgx/llvm.org/v*/bin/clang' -> '/home/runner/work/brewkit/brewkit/homes/stark.com__foo-1.13.0/toolchain/cc'
    Deno.symlinkSync(target.string, this.string)

@jhheider
Copy link
Contributor

jhheider commented Feb 5, 2024

add .rm() to const d = config.path.home.join('toolchain').mkdir('p') probably.

@jhheider
Copy link
Contributor

jhheider commented Feb 5, 2024

or you can make Path.ln() do .rm() automatically, but that feels a little too magical.

@mxcl
Copy link
Member Author

mxcl commented Feb 5, 2024

Path.ts has the attitude of “if the thing you want to do is already done it’s a noop” so it fits. But not willing to bump libpkgx to fix the issue here.

Monorepos have advantages.

@jhheider
Copy link
Contributor

jhheider commented Feb 5, 2024

i think that's probably often true in path management. but, and maybe you feel differently, i expect cp/mv/ln to overwrite by default (and get irrationally upset when ln doesn't and complains). so, something to consider in the interface design.

if Deno.symlinkSync() had a force option, that'd be the obvious bit to expose. we could add a force option to ln(), but that'd just be chaining in a .rm().

@mxcl mxcl merged commit 09713c5 into main Feb 5, 2024
@mxcl mxcl deleted the fix/303 branch February 5, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants