-
Notifications
You must be signed in to change notification settings - Fork 36
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
Cleanup setup scripts #627
Conversation
Signed-off-by: Konstantinos Kallas <konstantinos.kallas@hotmail.com>
Signed-off-by: Konstantinos Kallas <konstantinos.kallas@hotmail.com>
Signed-off-by: Konstantinos Kallas <konstantinos.kallas@hotmail.com>
@nvasilakis @mgree the setup script no longer sends output to log files to improve debugability (especially when installing PaSh in CI and in docker images). I think this is fine in general too. If you think that is too verbose, we could hide output by default and only show it when a |
OS:ubuntu-20.04 |
OS = Debian 10
|
Looks good to me---I think no need for the flag or anything. It might make sense to include some meta commands to group stuff, as in https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines. But definitely not a big deal. It may also make sense to test for |
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.
lgtm; i can imagine adding
[ "$CI" != "true" ] && exec 3>&1 4>&2 >FOO.log 2>&1
at the top of scripts to hide output by default (saving stdout/stderr in fd 3/4 if we need them later for explicit, deliberate, always-on output)
OS:ubuntu-20.04 |
OS = Debian 10
|
@mgree The problem with this is that it hides all output, right? Would it be better if we instead made a function that can wrap all commands that produce heavy output and hides their output if an environment variable is set, for example: hide_if_not_verbose()
{
if [ "$verbose" == "true" ] || [ "$CI" == "true" ]; then
"$@"
else
>>log.txt 2>&1 "$@"
fi
} which could be called as follows: hide_if_not_verbose python3 -m pip install ... and we can have big progress output always on. |
This seems reasonable to me. Maybe better to only check |
Clean up the setup scripts by removing unnecessary components and by preserving all output for better debugability.