Skip to content

Commit

Permalink
[feat] macos support #21
Browse files Browse the repository at this point in the history
  • Loading branch information
Gr1N committed Jul 13, 2021
1 parent 03807e4 commit ca3d88a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
poetry-version: [1.1.7, 1.2.0a1]
os: [ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest, windows-latest]

fail-fast: true

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ This action supports versions of:

## Changelog

### v7

- **Fix**, support MacOS platform #21

### v6

- Support Windows platform #19
Expand Down
10 changes: 5 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ function getPoetryInstallArgs(inputs) {
return args;
}
function getPoetryPathArgs() {
if (os_1.default.platform() === "win32") {
return ["AppData", "Roaming", "Python", "Scripts"];
}
else {
return [".local", "share", "pypoetry", "bin"];
switch (os_1.default.platform()) {
case "win32":
return ["AppData", "Roaming", "Python", "Scripts"];
default:
return [".local", "bin"];
}
}

Expand Down
9 changes: 5 additions & 4 deletions src/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ function getPoetryInstallArgs(inputs: Inputs): string[] {
}

function getPoetryPathArgs(): string[] {
if (os.platform() === "win32") {
return ["AppData", "Roaming", "Python", "Scripts"]
} else {
return [".local", "share", "pypoetry", "bin"]
switch (os.platform()) {
case "win32":
return ["AppData", "Roaming", "Python", "Scripts"]
default:
return [".local", "bin"]
}
}

0 comments on commit ca3d88a

Please sign in to comment.