Skip to content
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

Changed error on unspecified output to warning #445

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/tup/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,12 +730,8 @@ static int update_write_info(FILE *f, tupid_t cmdid, struct file_info *info,
if(!tent) {
struct mapping *map;

fprintf(f, "tup error: File '%s' was written to, but is not in .tup/db. You probably should specify it as an output\n", w->filename);
write_bork = 1;
if(info->do_unlink) {
fprintf(f, " -- Delete: %s\n", w->filename);
unlink(w->filename);
}
if(tup_option_get_flag("display.unspecified_output_warnings"))
fprintf(f, "tup warning: File '%s' was written to, but is not in .tup/db. You should specify it as an output or ignore it\n", w->filename);

TAILQ_FOREACH(map, &info->mapping_list, list) {
if(strcmp(map->realname, w->filename) == 0) {
Expand Down
1 change: 1 addition & 0 deletions src/tup/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ static struct option {
{"display.job_numbers", "1", NULL, is_flag},
{"display.job_time", "1", NULL, is_flag},
{"display.quiet", "0", NULL, is_flag},
{"display.unspecified_output_warnings", "1", NULL, is_flag},
{"monitor.autoupdate", "0", NULL, is_flag},
{"monitor.autoparse", "0", NULL, is_flag},
{"monitor.foreground", "0", NULL, is_flag},
Expand Down
3 changes: 3 additions & 0 deletions tup.1
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ Set to '0' to avoid displaying the runtime of a job along with the results. The
.B display.quiet (default '0')
Set to '1' to prevent tup from displaying most output. Tup will still display a banner and output from any job that writes to stdout/stderr, or any job that returns a non-zero exit code. The progress bar is still displayed; see also display.progress for really quiet output.
.TP
.B display.unspecified_output_warnings (default '1')
Set to '0' to disable warnings, when a file that is not specified as an output is created.
.TP
.B monitor.autoupdate (default '0')
Set to '1' to automatically rebuild if a file change is detected. This only has an effect if the monitor is running. The default is '0', which means you have to type 'tup' when you are ready to update.
.TP
Expand Down