Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
fcoclavero committed Aug 26, 2020
1 parent be74180 commit 24c1463
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
23 changes: 0 additions & 23 deletions cloud-sql-proxy/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,33 +132,10 @@ function run() {
if (!authenticated) {
core.setFailed('Error authenticating the Cloud SDK.');
}
console.log(process.cwd());
console.log(__dirname);
// const child = spawn('ls', ['-l'], {
// cwd: resolve(__dirname, '../lib'),
// });
// child.stdout.on('data', function (data) {
// console.log('ls command output: ' + data);
// });
// child.stderr.on('data', function (data) {
// console.log('stderr: ' + data);
// });
// child.on('close', function (code) {
// console.log('child process exited with code ' + code);
// });
const child = child_process_1.spawn('./cloud_sql_proxy', [`-instances=${instanceConnectionName}=tcp:${port}`], {
cwd: __webpack_require__.ab + "lib",
detached: true,
});
child.stdout.on('data', function (data) {
console.log('cloud_sql_proxy command output: ' + data);
});
child.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
child.on('close', function (code) {
console.log('child process exited with code ' + code);
});
child.unref();
}
catch (error) {
Expand Down
28 changes: 0 additions & 28 deletions cloud-sql-proxy/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,6 @@ async function run(): Promise<void> {
core.setFailed('Error authenticating the Cloud SDK.');
}

console.log(process.cwd());
console.log(__dirname);

// const child = spawn('ls', ['-l'], {
// cwd: resolve(__dirname, '../lib'),
// });

// child.stdout.on('data', function (data) {
// console.log('ls command output: ' + data);
// });
// child.stderr.on('data', function (data) {
// console.log('stderr: ' + data);
// });

// child.on('close', function (code) {
// console.log('child process exited with code ' + code);
// });

const child = spawn(
'./cloud_sql_proxy',
[`-instances=${instanceConnectionName}=tcp:${port}`],
Expand All @@ -56,16 +38,6 @@ async function run(): Promise<void> {
detached: true,
},
);
child.stdout.on('data', function (data) {
console.log('cloud_sql_proxy command output: ' + data);
});
child.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});

child.on('close', function (code) {
console.log('child process exited with code ' + code);
});
child.unref();
} catch (error) {
core.setFailed(error.message);
Expand Down

0 comments on commit 24c1463

Please sign in to comment.