forked from agda/agda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix agda#7331: handle permission error when search for project file
Closes agda#7331.
- Loading branch information
1 parent
2ec1cad
commit 777b07f
Showing
4 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Checking Issue7331 (Issue7331/dir/Issue7331.agda). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Andreas, 2024-06-26, issue #7331: | ||
# Handle permission error sensibly when looking for project root. | ||
|
||
AGDA=${1} | ||
|
||
mkdir -p Issue7331/dir > /dev/null | ||
touch Issue7331/dir/Issue7331.agda > /dev/null | ||
pushd Issue7331/dir > /dev/null | ||
|
||
# Drop permissions for parent dir | ||
chmod -r .. > /dev/null | ||
|
||
${AGDA} --ignore-interfaces Issue7331.agda | ||
result=$? | ||
|
||
# Clean up | ||
popd > /dev/null | ||
chmod +r Issue7331 > /dev/null | ||
rm -rf Issue7331 > /dev/null | ||
|
||
exit $result |