-
Notifications
You must be signed in to change notification settings - Fork 864
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: update ipfsd-ctl to 4.x #1411
Conversation
3f83090
to
9d1de70
Compare
Seems to fail only on AppVeyor. It does seem to be something to do with the output parsing. For some reason I'm not being able to download Electron dep on Windows (too slow, networking issues?) right now. Update: can reproduce errors (tests) on Windows! |
@lidel it seems the tests failed on Windows because of some beautiful characters known as CR. |
c19a4a4
to
5daa783
Compare
5daa783
to
b952985
Compare
I'll take a look at this as soon as I figure out how to get tray icon back (#1153) 🙃 |
Just upgraded some files where I saw the API changed. Completely missed those! |
Update to 4.x blocked: ipfs/js-ipfsd-ctl#501 |
7b75895
to
2e5989d
Compare
2e5989d
to
f68388f
Compare
@lidel seems to be working! |
f68388f
to
30d5ab2
Compare
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This fixes a bug when local ipfsd.stop() was called even when no IPFS_PATH/config was present. License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
30d5ab2
to
aa78dd4
Compare
Just rebased on top of master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -78,21 +78,19 @@ module.exports = async function (ctx) { | |||
const log = logger.start('[ipfsd] stop daemon', { withAnalytics: 'DAEMON_STOP' }) | |||
updateStatus(STATUS.STOPPING_STARTED) | |||
|
|||
if (!fs.pathExists(join(ipfsd.repoPath, 'config'))) { | |||
if (!fs.pathExistsSync(join(ipfsd.path, 'config'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopsie. I knew that but completely missed. Probably forgot adding an await
. Thanks!
const freeGatewayPort = await portfinder.getPortPromise({ port: gatewayPort, stopPort: gatewayPort + 100 }) | ||
const freeApiPort = await portfinder.getPortPromise({ port: apiPort, stopPort: apiPort + 100 }) | ||
const findFreePort = async (port, from) => { | ||
port = Math.max(port, from, 1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, this Math.max
call prevents me from setting a gateway port lower than 8080, and an api port lower than 5001. When I edit the config file and restart ipfs-desktop, it says the port is busy and suggests a new one.
For example if I try to set gateway port to 6437, then
const gatewayPort = 6437 // read from config file
const freeGatewayPort = await findFreePort(gatewayPort, 8080) // returns 8080
// evaluates to true, even though 6437 is free.
const busyGatewayPort = gatewayPort !== freeGatewayPort
// I get a popup saying "The port 6437 is not available. Do you want to use 8080 instead?"
Superseeds #1302. Closes #1412.
I'm starting this on a new branch with the version 3.x. I'm using a lot o @lidel's work on that PR.