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

feat: allow setting of working directory #473

Merged
merged 25 commits into from
Jan 8, 2024

Conversation

isavov
Copy link
Contributor

@isavov isavov commented Dec 19, 2023

Description:
This PR allows setting of the working directory where local node writes its ephemeral data which can be set using the --workdir flag, and has a default value dependant on the OS of the user

OS Default Working Directory
MacOS ~/Library/Application Support/hedera-local
Linux ~/.local/share/hedera-local
Windows %USERPROFILE%\AppData\Local\hedera-local

Related issue(s):

Fixes #308

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@isavov isavov added Bug An error that causes the feature to behave differently than what was expected based on design. New Feature A new feature, service, or documentation. Major changes that are not backwards compatible. CLI Feature that impacts the CLI tool labels Dec 19, 2023
@isavov isavov self-assigned this Dec 19, 2023
@isavov isavov linked an issue Dec 19, 2023 that may be closed by this pull request
@isavov isavov force-pushed the 308-local-node-requires-sudo-privileges branch from 4f0928f to c4dd26d Compare January 3, 2024 08:19
@isavov isavov marked this pull request as ready for review January 3, 2024 13:35
@isavov isavov requested a review from georgi-l95 January 3, 2024 14:52
@isavov isavov force-pushed the 308-local-node-requires-sudo-privileges branch from f998b5a to 4f8dfee Compare January 3, 2024 14:59
Copy link
Contributor

@stefan-stefanooov stefan-stefanooov left a comment

Choose a reason for hiding this comment

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

These changes also breaks the debug command.
Its Something around the new paths. Lets debug it tomorrow.

@stefan-stefanooov stefan-stefanooov self-requested a review January 4, 2024 08:22
type: 'string',
describe: 'Path to the working directory for local node',
demandOption: false,
default: FileSystemUtils.getPlatformSpecificAppDataPath('hedera-local')
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldnt this be hedera-local-node instead of hedera-local

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've chosen hedera-local because the official npm package name is @hashgraph/hedera-local, we might want to set it to something else, I'm open to suggestions

@isavov isavov requested a review from konstantinabl January 4, 2024 13:40
isavov added 10 commits January 8, 2024 11:20
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
isavov added 15 commits January 8, 2024 11:20
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
@isavov isavov force-pushed the 308-local-node-requires-sudo-privileges branch from 14e737d to d06b889 Compare January 8, 2024 09:21
Copy link

sonarqubecloud bot commented Jan 8, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@georgi-l95 georgi-l95 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@natanasow natanasow left a comment

Choose a reason for hiding this comment

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

LGTM, works on Ubuntu 🚀 👏

@isavov isavov merged commit 221941d into main Jan 8, 2024
9 checks passed
@isavov isavov deleted the 308-local-node-requires-sudo-privileges branch January 8, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An error that causes the feature to behave differently than what was expected based on design. CLI Feature that impacts the CLI tool New Feature A new feature, service, or documentation. Major changes that are not backwards compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local node requires sudo privileges
5 participants