Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f21011a

Browse filesBrowse files
author
Takashi Matsuo
committed
remove the tmpdir at the end
1 parent e38206a commit f21011a
Copy full SHA for f21011a

File tree

Expand file treeCollapse file tree

1 file changed

+9
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-4
lines changed

‎.kokoro/trampoline_v2.sh

Copy file name to clipboardExpand all lines: .kokoro/trampoline_v2.sh
+9-4Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ function log_red() {
8888
log_impl "${IO_COLOR_RED}" "$@"
8989
}
9090

91+
readonly tmpdir=$(mktemp -d -t ci-XXXXXXXX)
92+
readonly tmphome="${tmpdir}/h"
93+
mkdir -p "${tmphome}"
94+
95+
function cleanup() {
96+
rm -rf "${tmpdir}"
97+
}
98+
trap cleanup EXIT
99+
91100
function repo_root() {
92101
local dir="$1"
93102
while [[ ! -d "${dir}/.git" ]]; do
@@ -96,10 +105,6 @@ function repo_root() {
96105
echo "${dir}"
97106
}
98107

99-
readonly tmpdir=$(mktemp -d -t ci-XXXXXXXX)
100-
readonly tmphome="${tmpdir}/h"
101-
mkdir -p "${tmphome}"
102-
103108
PROGRAM_PATH="$(realpath "$0")"
104109
PROGRAM_DIR="$(dirname "${PROGRAM_PATH}")"
105110
PROJECT_ROOT="$(repo_root "${PROGRAM_DIR}")"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.