Comments (2)
In terms of usability, this is sorely needed. At the moment, errors are just dumped into the .log
where one must search through to find the actual reason for netlifyctl
returning an error.
A perfect example is trying a command that requires auth, without having first logged in. One would expect that running netlifyctl assets
when not logged in would just prompt you to login, as you're attempting an operation that requires auth. As it is, you just get a big fat error log file that pollutes your repo.
from netlifyctl.
Another example, running netlifyctl init
for the first time:
Received error:
netlifyctl-windows-amd64-0.3.2 ❯ ./netlifyctl.exe init
There was an error running this command.
Debug log dumped to netlifyctl-debug.log
This log includes full recordings of HTTP requests with credentials, be careful if you share it
Logs:
netlifyctl-windows-amd64-0.3.2 ❯ cat netlifyctl-debug.log
time="06 Apr 18 16:00 +0100" level=debug msg=PreRun arguments=[] command=init
time="06 Apr 18 16:00 +0100" level=debug msg="configure debug middleware"
time="06 Apr 18 16:00 +0100" level=debug msg="configure logging middleware"
time="06 Apr 18 16:00 +0100" level=debug msg="setup logger middleware: panic"
time="06 Apr 18 16:00 +0100" level=debug msg="configure auth middleware"
time="06 Apr 18 16:00 +0100" level=debug msg="setup credentials" credentials=0x877cc0
time="06 Apr 18 16:00 +0100" level=debug msg="configure client middleware"
time="06 Apr 18 16:00 +0100" level=debug msg="setup API endpoint" endpoint="https://api.netlify.com"
time="06 Apr 18 16:00 +0100" level=error msg="command failed" error="repository not exists"
Would it be possible to include the error in the returned string from here? The debug log could perhaps only be written if a debug flag is passed and instead the error written to stdout/stderr. In this way I would have received the following error instead of the above:
~ ❯ netlifyctl init
repository does not exist
It's still not hugely helpful, the message comes from the src-d/go-git.v4
package but the messages could be received and improved in some way perhaps depending on the error, ie. adding please run init inside a git repository
?
from netlifyctl.
Related Issues (20)
- `init` doesn't seem to support repos cloned via https HOT 1
- Unable to login
- [GitLab] Push & Merge events not working properly. HOT 3
- netlifyctl asks for path to deploy with "yes" flag
- Bad paths for GitLab repos with `init`
- Add support for performing a branch deploy/deploy preview from the CLI HOT 13
- --base-directory flag name is misleading
- how to install it on windows HOT 1
- netlifyctl deploy hangs during object upload HOT 3
- "unknown field 'Repo'" when installing HOT 3
- Install instructions for WSL HOT 4
- Authentication browser window not opening for Windows Subsystem Linux (WSL) HOT 1
- TOML case insensitivity HOT 1
- Makefile sets Darwin/AMD64 as default build target
- README.md Direct binary install
- How much longer is this cli supported? HOT 2
- Incremental deploys HOT 1
- Deploy failed. HOT 1
- Please continue supporting the Go-based single self-contained executable
- Failed deploy does not exit neither gives an error message 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 netlifyctl.