@@ -4,31 +4,27 @@ if ! test -n "${SKIP_DEVCONTAINER_UTILS_POST_ATTACH_COMMAND:+x}"; then
4
4
# shellcheck disable=SC1091
5
5
. devcontainer-utils-init-git-interactive;
6
6
7
+ # Reset sccache-dist configuration
8
+ devcontainer-utils-init-sccache-dist;
9
+
10
+ # Initialize the GitHub CLI with the appropriate user scopes
11
+ # shellcheck disable=SC1091
12
+ . devcontainer-utils-creds-s3-init;
13
+
7
14
# Update sccache client configuration to enable/disable sccache-dist
8
15
if test -n " ${DEVCONTAINER_UTILS_ENABLE_SCCACHE_DIST: +x} " ; then
9
16
if test -n " ${SCCACHE_DIST_TOKEN: +x} " ; then
10
- devcontainer-utils-install-sccache --repo trxcllnt/sccache --version latest ;
17
+ devcontainer-utils-install-sccache --repo trxcllnt/sccache;
11
18
# Update ~/.config/sccache/config to use $SCCACHE_DIST_TOKEN
12
19
devcontainer-utils-init-sccache-dist \
13
20
--enable-sccache-dist - <<< " \
14
21
--auth-type 'token' \
15
22
--auth-token '${SCCACHE_DIST_TOKEN}' \
16
23
" ;
17
- else
18
- # Initialize the GitHub CLI with the appropriate user scopes
19
- # shellcheck disable=SC1091
20
- . devcontainer-utils-init-github-cli;
21
- if gh auth status > /dev/null 2>&1 ; then
22
- devcontainer-utils-install-sccache --repo trxcllnt/sccache --version latest;
23
- # Update ~/.config/sccache/config to use gh token auth
24
- devcontainer-utils-init-sccache-dist --enable-with-github-auth;
25
- fi
24
+ elif gh auth status > /dev/null 2>&1 ; then
25
+ devcontainer-utils-install-sccache --repo trxcllnt/sccache;
26
+ # Update ~/.config/sccache/config to use gh token auth
27
+ devcontainer-utils-init-sccache-dist --enable-with-github-auth;
26
28
fi
27
- else
28
- # Delete sccache-dist configuration from ~/.config/sccache/config
29
- devcontainer-utils-init-sccache-dist;
30
29
fi
31
-
32
- # shellcheck disable=SC1091
33
- . devcontainer-utils-creds-s3-init;
34
30
fi
0 commit comments