Skip to content

Commit 9114c46

Browse files
Changing add_task to try to get around 'output'not being identical to 'character(0)'
1 parent 03ccb98 commit 9114c46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/todo.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ TASK_FILE <- ".tasks.txt" # nolint
88
add_task <- function(task) { #Trying to correct the function
99
write(task, file = TASK_FILE, append = TRUE, sep = "\n")
1010
#Adding the task to read the lines
11+
if (interactive()) {
1112
cat(paste0("Added task: ", task, "\n"))
1213
}
13-
14+
}
1415
list_tasks <- function() {
1516
if (!file.exists(TASK_FILE)) return("No tasks found.")
1617
tasks <- readLines(TASK_FILE)

0 commit comments

Comments
 (0)