Merge pull request #55 from aminya/untildify-mac [skip ci]

This commit is contained in:
Amin Yahyaabadi 2022-04-24 16:56:16 -07:00 committed by GitHub
commit b8a4ce1807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View File

@ -9,7 +9,7 @@ on:
jobs:
Test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip test]') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@ -81,6 +81,7 @@ jobs:
continue-on-error: ${{ contains(matrix.os, 'ubuntu-18.04') }}
Docker:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip docker]') }}
runs-on: ${{ matrix.os }}
strategy:
matrix:

View File

@ -1,10 +1,10 @@
FROM ubuntu:latest
FROM ubuntu:20.04
# set time-zone
ENV TZ=Canada/Pacific
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# The nodejs that ships on ubuntu:latest servers is too old.
# The nodejs that ships on ubuntu:20.04 servers is too old.
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq
RUN apt-get install -y --no-install-recommends curl gnupg ca-certificates

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,11 @@ import { isRoot } from "../env/sudo"
export function untildify_user(path: string) {
if (isRoot() && typeof process.env.SUDO_USER === "string") {
// use the user profile even if root
return join("/home/", process.env.SUDO_USER, path)
if (process.platform === "darwin") {
return join("/Users/", process.env.SUDO_USER, path)
} else {
return join("/home/", process.env.SUDO_USER, path)
}
} else {
return untildify(`~/${path}`)
}