Skip to content

Commit

Permalink
Merge pull request #230 from madbob/check_symlink
Browse files Browse the repository at this point in the history
controllo symlink in Linux
  • Loading branch information
damikael authored Sep 21, 2024
2 parents e14af90 + 30b4986 commit 698fda6
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 698fda6

Please sign in to comment.