Skip to content

Files

Latest commit

 

History

History
39 lines (24 loc) · 830 Bytes

SC2226.md

File metadata and controls

39 lines (24 loc) · 830 Bytes

Pattern: Use of ln without destination

Issue: -

Description

This may be because the source and destination was accidentally merged into a single argument, because the line was broken in an invalid way, or because you're using a non-standard invocation of ln that defaults to linking the argument into the current directory.

If you wanted to specify both source and destination, fix the ln statement.

If you wanted to link a file into the current directory, prefer using the more explicit and POSIX standard invocation ln /your/file .

Example of incorrect code:

ln "$file $dir"

or

ln /foo/bar/baz

Example of correct code:

ln "$file" "$dir"

or

ln /foo/bar/baz .

Further Reading