Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Kaya-cli creating relative path ../data #78

Open
ronaldmannak opened this issue Mar 17, 2019 · 1 comment
Open

Kaya-cli creating relative path ../data #78

ronaldmannak opened this issue Mar 17, 2019 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@ronaldmannak
Copy link

When running kaya-cli, the app seems to create a new directory relative to the path the app was started: ../data

The directory is not removed after the app closes, so it should be relatively easy to confirm the issue.

The reason this is a problem is 1) it creates a directory in a place you, as a user, probably don't want a random directory to be created, and 2) depending from which directory you open kaya-cli, the app could fail to launch.

$ cd /Users/ronalddanger
$ kaya-cli
ZILLIQA KAYA RPC SERVER (ver: 0.2.6)
Server listening on 127.0.0.1:4200
Running from local interpreter
================================================================================
fs.js:119
    throw err;
    ^

Error: EACCES: permission denied, mkdir ‘../data/‘
    at Object.mkdirSync (fs.js:773:3)
    at Object.prepareDirectories (/usr/local/lib/node_modules/kaya-cli/src/utilities.js:177:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/kaya-cli/src/app.js:90:7)
    at Module._compile (internal/modules/cjs/loader.js:738:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
    at Module.load (internal/modules/cjs/loader.js:630:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
    at Function.Module._load (internal/modules/cjs/loader.js:562:3)
    at Module.require (internal/modules/cjs/loader.js:667:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/kaya-cli/src/server.js:26:13)
    at Module._compile (internal/modules/cjs/loader.js:738:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
    at Module.load (internal/modules/cjs/loader.js:630:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
    at Function.Module._load (internal/modules/cjs/loader.js:562:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
    at internal/main/run_main_module.js:21:11
@edison0xyz
Copy link
Contributor

Noted.

File directory isn't ideal. But it can be resolved if we move the state into a db.

@edison0xyz edison0xyz added this to the kaya-rpc 0.3 milestone Mar 25, 2019
@edison0xyz edison0xyz added the enhancement New feature or request label Mar 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants