Skip to content

Commit 70a9c9d

Browse files
authored
Merge pull request #17 from BrianCArnold/master
Get rid of setting output variable to perl script / logging info
2 parents 559644e + 798bfcd commit 70a9c9d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ async function install_cpm(install_to) {
3131
const version = core.getInput("version");
3232
const url = `https://raw.githubusercontent.com/skaji/cpm/${version}/cpm`;
3333

34-
core.setOutput(`Get cpm from ${url}`);
34+
core.info(`Get cpm from ${url}`);
3535

3636
const cpmScript = await tc.downloadTool(url);
3737

38-
core.setOutput("cpm", cpmScript);
38+
core.info("cpm", cpmScript);
3939

40-
console.log(`install_to ${install_to}`);
40+
core.info(`install_to ${install_to}`);
4141

4242
const platform = os.platform();
43-
//console.log(`OS: :${platform}:`);
43+
//core.info(`OS: :${platform}:`);
4444

4545
if (platform == "win32") {
4646
await io.cp(cpmScript, install_to);
@@ -83,7 +83,7 @@ async function do_exec(cmd) {
8383
const platform = os.platform();
8484
const bin = sudo && platform != "win32" ? "sudo" : cmd.shift();
8585

86-
console.log(`do_exec: ${bin}`);
86+
core.info(`do_exec: ${bin}`);
8787

8888
await exec.exec(bin, cmd);
8989
}
@@ -134,7 +134,7 @@ async function run() {
134134
/* install one ore more modules */
135135
if (install !== null && install.length) {
136136
// install one or more modules
137-
console.log(`install: ${install}!`);
137+
core.info(`install: ${install}!`);
138138
const list = install.split("\n");
139139

140140
var cmd = [...CMD_install]; /* clone array */
@@ -147,9 +147,9 @@ async function run() {
147147
/* install from cpanfile */
148148
if (cpanfile !== null && cpanfile.length) {
149149
// install one or more modules
150-
console.log(`cpanfile: ${cpanfile}!`);
150+
core.info(`cpanfile: ${cpanfile}!`);
151151
const cpanfile_full_path = path.resolve(cpanfile);
152-
console.log(`cpanfile: ${cpanfile_full_path}! [resolved]`);
152+
core.info(`cpanfile: ${cpanfile_full_path}! [resolved]`);
153153

154154
var cmd = [...CMD_install];
155155
cmd.push("--cpanfile", cpanfile_full_path);
@@ -160,7 +160,7 @@ async function run() {
160160

161161
/* custom run with args */
162162
if ( has_run === false && w_args.length ) {
163-
console.log(`custom run with args`);
163+
core.info(`custom run with args`);
164164
var cmd = [...CMD_install];
165165
has_run = true;
166166
await do_exec(cmd);

0 commit comments

Comments
 (0)