You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($myFilesDir === false || !is_dir($myFilesDir)) {
692
+
return"Allsky could not test this module because the configured scripts folder is not available.\n\nExpected scripts folder: " . (string)ALLSKY_MYFILES_DIR . "\n\nCheck the scripts folder setting in variables.json and make sure that folder exists.";
693
+
}
694
+
695
+
foreach ($flowDataas$moduleData) {
696
+
if (!is_array($moduleData) || ($moduleData['module'] ?? '') !== 'allsky_script.py') {
return"Allsky could not test this module because no script has been selected.\n\nChoose a script from " . $myFilesDir . " and try the test again.";
703
+
}
704
+
705
+
if ($script[0] !== '/') {
706
+
return"Allsky could not test this module because the selected script is not a full file path.\n\nSelected script: " . $script . "\n\nChoose the script again from " . $myFilesDir . " so Allsky can save the full path.";
707
+
}
708
+
709
+
$realScript = realpath($script);
710
+
if ($realScript === false || !is_file($realScript)) {
711
+
return"Allsky could not test this module because it cannot find the selected script.\n\nSelected script: " . $script . "\n\nThe script may have been deleted, renamed, or moved. Put the script in " . $myFilesDir . " and select it again.";
712
+
}
713
+
714
+
if (!$this->isPathWithinDirectory($realScript, $myFilesDir)) {
715
+
return"Allsky could not test this module because the selected script is outside the allowed scripts folder.\n\nSelected script: " . $realScript . "\nAllowed scripts folder: " . $myFilesDir . "\n\nMove the script into the allowed folder, select it again in the module settings, and then run the test again.";
716
+
}
717
+
718
+
if (!is_readable($realScript)) {
719
+
return"Allsky could not test this module because it cannot read the selected script.\n\nSelected script: " . $realScript . "\n\nCheck the file permissions for the script. Allsky needs permission to read the script before it can run it.";
720
+
}
721
+
722
+
if (!is_executable($realScript)) {
723
+
return"Allsky could not test this module because the selected script is not marked as executable.\n\nSelected script: " . $realScript . "\n\nMark the script as executable, then run the test again. If you are not sure how to do this, ask whoever supplied the script to check its permissions.";
0 commit comments