Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output of which command in Phoenix is wrong for built-in apps (eg, Terminal and Phoenix) #500

Open
1 of 4 tasks
AtkinsSJ opened this issue Jun 27, 2024 · 0 comments
Open
1 of 4 tasks

Comments

@AtkinsSJ
Copy link
Collaborator

Issue Description

Several apps are included as part of the Puter distribution. These have their URL set in the DB with a prefix of https://builtins.namespaces.puter.com/, which is automatically replaced with whatever the real domain is. However, this original fake domain shows up in which output. The purpose of which is to tell you the real location of an executable, so we want the true URL displayed here.

This is quite minor, but we probably want all users of the API to get the actual app urls, not fake ones.

Steps to Reproduce

  1. Open the Terminal
  2. Run which terminal

Expected & Actual Behavior

Note that the result is https://builtins.namespaces.puter.com/terminal which is the fake url, whereas the real one (for me) is http://puter.localhost:4100/builtin/terminal.

Addition Information or Screenshots (if applicable)

I attempted to apply the conversion from here:

const BUILTIN_PREFIX = 'https://builtins.namespaces.puter.com/';

...to here:

async read_transform (entity) {

...but there are a couple of issues. One, I wasn't able to remove the original conversion from launch_app() because that's apparently using a different API endpoint that's unrelated to that AppES one. And two, modifying the output from the DB like this feels wrong, in that we might want to display the true DB value in an app management GUI.

So, the best option might be to duplicate that conversion in which itself. I'd like to avoid that though.

Deployment

  • Production (puter.com)
  • Development (npm run start)
  • Docker (via docker run)
  • Docker (via docker-compose)

Puter version (if accessible)

Click the profile button on the top-right, then "Settings". The version number will be printed at the bottom

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

No branches or pull requests

1 participant