Skip to content

Commit

Permalink
Merge pull request github#2 from mavasani/mavasani-patch-2
Browse files Browse the repository at this point in the history
Update action.ts
  • Loading branch information
mavasani authored Jan 22, 2021
2 parents 6440106 + d31074a commit e586115
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ var configContent = {
]
};

const actionDirectory = path.resolve(__dirname);
core.debug(`actionDirectory = ${actionDirectory}`);

let data = JSON.stringify(configContent);
var gdnConfigFilePath = path.join(os.tmpdir(), 'roslynanalyzers.gdnconfig');
var gdnConfigFilePath = path.join(actionDirectory, 'roslynanalyzers.gdnconfig');
try
{
fs.writeFileSync(gdnConfigFilePath, data);
Expand All @@ -136,9 +139,6 @@ args.push('-c');
args.push(gdnConfigFilePath);

// Use the local policy file
const actionDirectory = path.resolve(__dirname);
core.debug(`actionDirectory = ${actionDirectory}`);

const policyFilePath = path.resolve(path.join(actionDirectory, '../', 'policy', 'github.gdnpolicy'));
core.debug(`policyFilePath = ${policyFilePath}`);

Expand All @@ -147,11 +147,13 @@ args.push(policyFilePath);

action.run(args);

/*
try
{
fs.unlinkSync(gdnConfigFilePath);
}
catch(err)
{
console.error(err)
}
}
/*

0 comments on commit e586115

Please sign in to comment.