Skip to content

Commit

Permalink
수정된 파일 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hhgyu committed Dec 4, 2023
1 parent f984b85 commit e6d1b88
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 33 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ jobs:
run: |
virtualhere-pipe.ps1 "STOP USING,${{ steps.find-usb-token.outputs.TOKEN_ADDRESS }}"
virtualhere-pipe.ps1 "MANUAL HUB REMOVE,${{ secrets.VIRTUALHERE_SERVER }}"
6 changes: 1 addition & 5 deletions dist/cleanup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24769,11 +24769,7 @@ function run() {
return;
}
{
const p = (0, node_child_process_1.spawnSync)(`pwsh${(0, node_os_1.platform)() == 'win32' ? '.exe' : ''}`, [
'-NoProfile',
'-Command',
stopCommand
], { encoding: 'utf8', env: process.env });
const p = (0, node_child_process_1.spawnSync)(`pwsh${(0, node_os_1.platform)() == 'win32' ? '.exe' : ''}`, ['-NoProfile', '-Command', stopCommand], { encoding: 'utf8', env: process.env });
if (p.error) {
throw p.error;
}
Expand Down
14 changes: 3 additions & 11 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32018,7 +32018,7 @@ function installVCVersion(info, auth, arch) {
const fileName = isWindows ? node_path_1.default.join(tempDir, info.fileName) : undefined;
const downloadPath = yield (0, tool_cache_1.downloadTool)(info.downloadUrl, fileName, auth);
core.info('Extracting VirtualHere-Client...');
let extPath = yield extractVCArchive(downloadPath);
const extPath = yield extractVCArchive(downloadPath);
core.info(`Successfully extracted VirtualHere-Client to ${extPath}`);
core.info('Adding to the cache ...');
const toolCacheDir = yield addExecutablesToToolCache(extPath, info, arch);
Expand Down Expand Up @@ -32168,11 +32168,7 @@ const startCommand = `&{
function run() {
var _a, _b, _c;
return __awaiter(this, void 0, void 0, function* () {
if (Object.hasOwn(process.env, 'JAVA_HOME')) {
core.error('JAVA_HOME not defined run actions/setup-java');
process.exit(1);
}
let version = core.getInput('vc-version');
const version = core.getInput('vc-version');
let arch = core.getInput('architecture');
// if architecture supplied but node-version is not
// if we don't throw a warning, the already installed x64 node will be used which is not probably what user meant.
Expand Down Expand Up @@ -32221,11 +32217,7 @@ function run() {
}
core.addPath(node_path_1.default.normalize(node_path_1.default.join(__dirname, '..', 'scripts')));
{
const p = (0, node_child_process_1.spawnSync)(`pwsh${node_os_1.default.platform() == 'win32' ? '.exe' : ''}`, [
'-NoProfile',
'-Command',
startCommand
], { encoding: 'utf8', env: process.env });
const p = (0, node_child_process_1.spawnSync)(`pwsh${node_os_1.default.platform() == 'win32' ? '.exe' : ''}`, ['-NoProfile', '-Command', startCommand], { encoding: 'utf8', env: process.env });
if (p.error) {
throw p.error;
}
Expand Down
14 changes: 5 additions & 9 deletions src/cleanup.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as core from '@actions/core';
import { spawnSync } from 'node:child_process';
import { platform } from 'node:os';
import {spawnSync} from 'node:child_process';
import {platform} from 'node:os';

// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to
Expand All @@ -23,19 +23,15 @@ const stopCommand = `&{
export async function run() {
try {
const shutdown = core.getBooleanInput('shutdown');

if (!shutdown) {
return;
}

{
const p = spawnSync(
`pwsh${platform() == 'win32' ? '.exe' : ''}`,
[
'-NoProfile',
'-Command',
stopCommand
],
['-NoProfile', '-Command', stopCommand],
{encoding: 'utf8', env: process.env}
);
if (p.error) {
Expand All @@ -45,7 +41,7 @@ export async function run() {
} else if (p.output[2] != '') {
throw new Error(`stderr : ${p.output[2]}`);
}

core.info('Successfully stoped VirtualHere-Client');
}
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ async function installVCVersion(
const downloadPath = await downloadTool(info.downloadUrl, fileName, auth);

core.info('Extracting VirtualHere-Client...');
let extPath = await extractVCArchive(downloadPath);
const extPath = await extractVCArchive(downloadPath);
core.info(`Successfully extracted VirtualHere-Client to ${extPath}`);

core.info('Adding to the cache ...');
Expand Down
8 changes: 2 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const startCommand = `&{
}`;

export async function run() {
let version = core.getInput('vc-version');
const version = core.getInput('vc-version');

let arch = core.getInput('architecture');

Expand Down Expand Up @@ -95,11 +95,7 @@ export async function run() {
{
const p = spawnSync(
`pwsh${os.platform() == 'win32' ? '.exe' : ''}`,
[
'-NoProfile',
'-Command',
startCommand
],
['-NoProfile', '-Command', startCommand],
{encoding: 'utf8', env: process.env}
);
if (p.error) {
Expand Down

0 comments on commit e6d1b88

Please sign in to comment.