mirror of https://github.com/aminya/setup-cpp
Merge pull request #55 from aminya/untildify-mac [skip ci]
This commit is contained in:
commit
b8a4ce1807
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
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}`)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue