Skip to content

Commit 33ab8fc

Browse files
Update run.sh
1 parent 0e410e5 commit 33ab8fc

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/run.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ installTypeScriptCompiler() {
148148
installHomebrew() {
149149
installNodejs
150150
echo -e "$msg12"
151-
local TIME1=$(current_time_ms)
151+
local TIME1=$(python3 "$GITHUB_ACTION_PATH/src/time.py")
152152
if ! command -v brew &> /dev/null; then # attempt 0: homebrew installed before running _just
153153
# attempt 1: install without logs
154154
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" > /dev/null 2>&1
@@ -165,26 +165,26 @@ installHomebrew() {
165165
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
166166
fi
167167
fi
168-
local TIME2=$(current_time_ms)
168+
local TIME2=$(python3 "$GITHUB_ACTION_PATH/src/time.py")
169169
HBVERSION=$(brew --version)
170-
HBSECONDS=$(calculate_duration "$TIME1" "$TIME2")
170+
HBSECONDS=$(node "$GITHUB_ACTION_PATH/src/time.js" "$TIME1" "$TIME2")
171171
echo -e "$msg13 $HBVERSION ($HBSECONDS)"
172172
}
173173
installDartSass() {
174174
echo -e "$msg14"
175-
local TIME1=$(current_time_ms) && \
175+
local TIME1=$(python3 "$GITHUB_ACTION_PATH/src/time.py")
176176
if ! command -v sass &> /dev/null; then # attempt 0: dart sass installed before running _just
177177
# attempt 1: install without logs
178-
brew install sass/sass/sass > /dev/null 2>&1 && \
178+
brew install sass/sass/sass > /dev/null 2>&1
179179
if ! command -v sass &> /dev/null; then
180180
# attempt 2: install with logs
181-
local ERROR_MESSAGE=$(ErrorMessage "run.sh" "0212") && \
182-
echo -e "$ERROR_MESSAGE" && \
181+
local ERROR_MESSAGE=$(ErrorMessage "run.sh" "0212")
182+
echo -e "$ERROR_MESSAGE"
183183
brew install sass/sass/sass
184184
fi
185-
fi && \
186-
local TIME2=$(current_time_ms) && \
187-
DSSECONDS=$(calculate_duration "$TIME1" "$TIME2") && \
185+
fi
186+
local TIME2=$(python3 "$GITHUB_ACTION_PATH/src/time.py")
187+
DSSECONDS=$(node "$GITHUB_ACTION_PATH/src/time.js" "$TIME1" "$TIME2")
188188
echo -e "$msg15 ($DSSECONDS)"
189189
}
190190

@@ -236,6 +236,7 @@ install_dependencies() {
236236
fi
237237

238238
if [[ "${USE_SASS,,}" == "true" ]]; then
239+
chmod +x "$GITHUB_ACTION_PATH/src/time.py" && \
239240
installHomebrew && \
240241
installDartSass &
241242
fi
@@ -264,7 +265,7 @@ compile_assets() {
264265

265266
if [[ "${COMPILE_SASS,,}" == "true" ]]; then
266267
PREPROCESSED="y"
267-
#checkForDartSass
268+
checkForDartSass
268269
source "$GITHUB_ACTION_PATH/lib/compile.sh"
269270
tocss "$INPUT_PATH" "sass"
270271
local DOCLEANUP=$(javascript $GITHUB_ACTION_PATH/src/check-cleanup.js "") && \
@@ -275,7 +276,7 @@ compile_assets() {
275276

276277
if [[ "${COMPILE_SCSS,,}" == "true" ]]; then
277278
PREPROCESSED="y"
278-
#checkForDartSass
279+
checkForDartSass
279280
source "$GITHUB_ACTION_PATH/lib/compile.sh"
280281
tocss "$INPUT_PATH" "scss"
281282
local DOCLEANUP=$(javascript $GITHUB_ACTION_PATH/src/check-cleanup.js "") && \

0 commit comments

Comments
 (0)