structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
491 stars 75 forks source link

Support executing via symlinks #43 #80

Closed pcolby closed 2 years ago

pcolby commented 2 years ago

This change allows strcuterizr.sh to be executed via any combination of nested / recursive symlinked files and directories.

Instead of relying on the readlink command's -f (and related) option, which is not readily available on macOS, it uses a combination of:

  1. readlink (without the -f) to resolve terminal (non-directory) symlinks; and
  2. cd -P to resolve all directory symlinks.

This has been tested (on GitHub hosted runners) with various symlink combinations on macOS (10.15, 11 and 12) and Ubuntu (18.04, 20.04 and 22.04).

I also took the opportunity to:

Cheers.

simonbrowndotje commented 2 years ago

Thank you!