Address comments

Signed-off-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
Xuanwo
2023-01-10 12:31:40 +08:00
parent 7c1ee8f42f
commit 835e255d1d
3 changed files with 45 additions and 4 deletions

View File

@@ -1,3 +1,17 @@
# Copyright 2023 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Test sccache name: Test sccache
on: [push, pull_request] on: [push, pull_request]

17
dist/index.js vendored
View File

@@ -6,6 +6,19 @@
"use strict"; "use strict";
// Copyright 2023 Mozilla Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k); var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -83,7 +96,7 @@ function getArch() {
case 'arm64': case 'arm64':
return 'aarch64'; return 'aarch64';
default: default:
return Error('not supported arch'); return Error('Unsupported arch "${process.arch}"');
} }
} }
function getPlatform() { function getPlatform() {
@@ -95,7 +108,7 @@ function getPlatform() {
case 'linux': case 'linux':
return 'unknown-linux-musl'; return 'unknown-linux-musl';
default: default:
return Error('not supported platform'); return Error('Unsupported platform "${process.platform}"');
} }
} }
function getExtension() { function getExtension() {

View File

@@ -1,3 +1,17 @@
// Copyright 2023 Mozilla Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import * as core from '@actions/core'; import * as core from '@actions/core';
import { import {
downloadTool, downloadTool,
@@ -58,7 +72,7 @@ function getArch(): Error | string {
case 'arm64': case 'arm64':
return 'aarch64'; return 'aarch64';
default: default:
return Error('not supported arch'); return Error('Unsupported arch "${process.arch}"');
} }
} }
@@ -71,7 +85,7 @@ function getPlatform(): Error | string {
case 'linux': case 'linux':
return 'unknown-linux-musl'; return 'unknown-linux-musl';
default: default:
return Error('not supported platform'); return Error('Unsupported platform "${process.platform}"');
} }
} }