Skip to content

Fix auto-install of pnpm and node on mode init - #16

Merged
catilac merged 2 commits into
mainfrom
14-auto-install-dependencies
Feb 2, 2026
Merged

Fix auto-install of pnpm and node on mode init#16
catilac merged 2 commits into
mainfrom
14-auto-install-dependencies

Conversation

@stephanmax

Copy link
Copy Markdown
Member

Changes

  • Introduce new method probeCommand to check for presence of critical tools pnpm and node
  • Introduce helper closure to stack notices in the status line of PDE
  • Make directory for builder optional

Fixes #14

@stephanmax stephanmax linked an issue Jan 28, 2026 that may be closed by this pull request
@Stefterv

Stefterv commented Jan 29, 2026

Copy link
Copy Markdown
Member
Screenshot 2026-01-29 at 19 11 33

I suspect this doesn't work because my shell env first prints my lovely terminal art before running anything else

Screenshot 2026-01-29 at 19 13 11

@stephanmax

stephanmax commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

That IS lovely! Interesting, I will check how I can distinguist command output and general shell output.

(Ah yes, I remember now, I am using a full-on interactive shell so we can have all the env variables, but that of course also triggers any user-defined shell startup code in .bashrc or equivalent.)

@catilac

catilac commented Jan 29, 2026

Copy link
Copy Markdown

@stephanmax this is working for me on gentoo/zsh/wayland /cc @lee2sman

@lee2sman

Copy link
Copy Markdown

how can i test? do i need to build from source? i don't have a kotlin or java environment set up for example.

@catilac

catilac commented Jan 29, 2026

Copy link
Copy Markdown

let us know what you're thinking for handling running shell commands @stephanmax

@lee2sman ooops nevermind. ill let you know when this is merged. i forgot you're not building

This ignores any user-defined output in an interactive shell that might
precede the output of the command.
@Stefterv

Copy link
Copy Markdown
Member
Screenshot 2026-01-30 at 12 01 26

@stephanmax

Copy link
Copy Markdown
Member Author

I think the easiest workaround is only considering the last line of the command output. This is not as rigorous a solution as I’d like, but my other ideas fall short as well.

  • We could redirect the command output to std error and read that stream. User-defined output would still go to std out and we could dinstinguish them.
  • We could just consider the error code. But I like the debugging information that pnpm and Node version give us.
  • Come up with a more clever test for a certain binary (without relying on an interactive shell)?!

@catilac

catilac commented Feb 2, 2026

Copy link
Copy Markdown

@stephanmax i like the idea of redirecting the the output to another stream. i suppose you could use stderr - though i do wonder how easy it would be for to output it to a new stream so that it doesn't pollute stderr?

As for your second idea - i love error codes. is there another way for getting the debug information without having to spit it all out to the console? Or a flag?

@stephanmax

stephanmax commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

I think your questions are valid and all culminate in my third bullet point :)

Happy to invest more time on this, but I’d say for now just considering the last line of output works well enough.

@catilac catilac left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good no need to make it a blocker!

@catilac
catilac merged commit 787887a into main Feb 2, 2026
@stephanmax
stephanmax deleted the 14-auto-install-dependencies branch February 2, 2026 06:35
@lee2sman

lee2sman commented Feb 6, 2026

Copy link
Copy Markdown

is there a way to test now or should i wait til there' a new release?

@catilac

catilac commented Feb 6, 2026

Copy link
Copy Markdown

@lee2sman it's merged in, so you can go ahead and test the way you planned to in the beginning

@Stefterv

Stefterv commented Feb 6, 2026

Copy link
Copy Markdown
Member

It's included in the new 0.6.0 release ☺️

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.

need some help installing p5.js mode

4 participants