https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247410

            Bug ID: 247410
           Summary: sh(1): Document that if the dot command fails to find
                    and source the file, the whole script fails
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: needs-patch
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: [email protected]
          Reporter: [email protected]

Let's consider the following script:

```
echo 1
[ 
echo 2
. /nonexistent
echo 3
```

The output of the script is:

```
1
[: missing ]
2
.: cannot open /nonexistent: No such file or directory
```

As we can see, the dot builtin does aborts the script if it cannot source the
desired file, while some other builtins, like [ in this example, just print an
error message and let the script proceed.

We should probably document this behavior.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to