Skip to content

Commit aa6ace8

Browse files
committed
Address review comments
1 parent 4612964 commit aa6ace8

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.devcontainer/codespace.code-workspace

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"cmake.useCMakePresets": "always",
4848
"cmake.generator": "Ninja",
4949
"C_Cpp.default.cStandard": "c17",
50-
"C_Cpp.default.cppStandard": "c++20",
50+
"C_Cpp.default.cppStandard": "c++23",
5151
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64",
5252
"C_Cpp.default.compileCommands": "${workspaceFolder:Phlex}/build/compile_commands.json",
5353
"C_Cpp.exclusionPolicy": "checkFolders",

.devcontainer/setup-repos.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,29 @@ fi
1717
clone_if_absent() {
1818
local repo=$1
1919
local dest="${WORKSPACE_ROOT}/${repo}"
20-
if [ -d "$dest" ]; then
20+
if [ -e "$dest/.git" ]; then
2121
echo "Repository already present: $dest"
2222
return
2323
fi
24+
echo "Existing directory at $dest is not a git repository; replacing it."
25+
rm -rf "$dest"
2426
echo "Cloning Framework-R-D/${repo} into ${dest} ..."
25-
git clone --depth 1 "https://github.com/Framework-R-D/${repo}.git" "$dest"
27+
local max_tries=5 current_try=0
28+
while ! git clone --depth 1 "https://github.com/Framework-R-D/${repo}.git" "$dest"; do
29+
(( ++current_try ))
30+
echo "Attempt $current_try/$max_tries to clone $repo from GitHub FAILED"
31+
(( current_try < max_tries )) || break
32+
sleep 5
33+
done
34+
if (( current_try == max_tries )); then
35+
echo "WARNING: unable to check out $repo to $dest from GitHub" 1>&2
36+
fi
2637
}
2738

2839
clone_if_absent phlex-design
2940
clone_if_absent phlex-examples
3041
clone_if_absent phlex-coding-guidelines
3142
clone_if_absent phlex-spack-recipes
43+
44+
echo "Repository already present: $dest"
45+
return

0 commit comments

Comments
 (0)