Comments (2)
With this commit a class was created to handle all i/o for the CLI; however, it still needs to be able to handle errors.
Some thoughts on how the errors need to be handled:
- There are multiple types of errors that need to be handled in a uniform way. The ones I can think of are
- Node errors (e.g. system-level errors like ENOENT, EPERM, etc.)
- NPM errors (since we call NPM under the hood, npm's unique error messages need to be parsed and handled in some way
- CLI-level errors (higher-level errors caused by bad input data, other error states, etc)
- these errors need to be uniform in how they are displayed (e.g. npm's error format and node's are somewhat different, npm outputs an
npm-debug.log
, etc.) - the error output needs to be as uniform as possible - the error output needs to have some ability to recognize context (so just handling errors via
process.on('uncaughtException')
is not the way to go)- node has a domain api that shows as deprecated, so using that is probably not the way to go, but it can provide a good starting point.
- error messages need to be as helpful to the end-user as possible, with an easy path to recover from failure
- e.g. ENOENT would ask the user if they want to create the missing folder (if it's a folder)
- EPERM - would give the user instructions as to how to fix folder permissions
- killed (would be thrown by NPM) - happens when npm runs out of memory and is killed by the OS
- might need to link to a doc on increasing swap space?
- any others would need to have a link to a troubleshooting doc perhaps?
from ghost-cli.
This should be made easier by the output refactor in #115, as well as if we switch to yarn (see #112)
from ghost-cli.
Related Issues (20)
- ghost cli config help ambiguity HOT 1
- ghost-cli complains about systemd files corrupted, then about "ghost" user not created when recreating them HOT 1
- Strictly following the Ubuntu install guide on Ubuntu 22.04 fails, because the `root` MySQL user gets created with `auth_socket` auth, not a password HOT 5
- Handle email sending failures during setup more cleanly HOT 2
- Ghost install did not create system/nginx-root folder HOT 1
- Command failed: yarn install --no-emoji --no-progress HOT 1
- Create users from client HOT 2
- Access denied for user 'root'@'localhost' HOT 5
- installation fails with success message - database empty HOT 4
- Installation Issues - Blinking at Step 4 & 5 HOT 3
- The underlying principle of Ghost-CLI HOT 1
- The way ghost doctor checks permissions could be improved HOT 1
- Systemd _precheck() code could be improved HOT 1
- Ghost install thinks itβs running in a non interactive shell HOT 6
- latest ghost-cli start crashing on freebsd stable/14 HOT 5
- Change font HOT 1
- Faulty ghost install from ghost install/update --archive or --zip HOT 3
- Local Ghost Installation Permission Issue HOT 1
- Add Dynamic Internal Linking via JSON input
- nginx and ssl setup fails due to assuming presence of certain /etc/nginx directories HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghost-cli.