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

Minor stuff #148

Merged
merged 3 commits into from
Aug 17, 2023
Merged

Minor stuff #148

merged 3 commits into from
Aug 17, 2023

Conversation

throwaway96
Copy link
Member

  • Allow Node.js services to be debugged when /var/luna/preferences/devmode_enabled isn't a file
  • Fix updateStartupScript on old webOS (with Node.js <=v0.12.x)
  • Only read start-devmode.sh once

The -d flag to run-js-service enables debugging, but it only works when
/var/luna/preferences/devmode_enabled is a file. This patches out that
check, allowing debugging of any non-system service run with this
wrapper even when devmode_enabled is a directory.
Buffer.indexOf() doesn't exist in old Node.js, so read the file into a
string instead.

This fixes "TypeError: undefined is not a function" when calling
updateStartupScript.

Also return a stack trace in the Luna payload on error to aid in
debugging any future issues.
This file was being read twice: once to hash it, and again for its
contents. The new function hashString() is now used to compute the hash
from the data already read.
@mariotaku mariotaku merged commit bb70e9e into webosbrew:main Aug 17, 2023
1 check passed
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.

2 participants