Skip to content

Commit

Permalink
Update Setup.php
Browse files Browse the repository at this point in the history
better check for symlink in Linux
  • Loading branch information
madbob committed Nov 13, 2023
1 parent b45f330 commit 30b4986
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions setup/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1013,12 +1013,19 @@ public static function setup(Event $event) {
} catch(Exception $e) {
$symlink_manual_creation_command= "WARNING! At the end of the installation execute as administrator this command:\n$mklink_cmd";
}

} else {
// linux
symlink($cmd_target, $cmd_link);
if (is_link($cmd_link)) {
if (readlink($cmd_link) != $cmd_target) {
$symlink_manual_creation_command= "WARNING! At the end of the installation check the symbolic link at $cmd_link, it must link to $cmd_target";
}
}
else {
symlink($cmd_target, $cmd_link);
}
}

if ($symlink_manual_creation_command === false) {
echo $colors->getColoredString("OK", "green");
} else {
Expand Down

0 comments on commit 30b4986

Please sign in to comment.