Skip to content

Commit

Permalink
Change working directory to use root project directory as target
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheusv committed Jul 6, 2020
1 parent e0a19db commit 3e6ddd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4910,6 +4910,9 @@ function run() {
try {
const version = core.getInput('version') || 'latest';
const insider = yield installer.getInsider(version);
const insiderPath = path.dirname(insider);
core.info(`πŸ“‚ Using ${insiderPath} as working directory...`);
process.chdir(insiderPath);
const args = getArguments();
core.info('πŸƒ Running Insider...');
yield exec.exec(`${insider}`, args);
Expand All @@ -4935,7 +4938,6 @@ function getArguments() {
const noHtml = core.getInput('noHtml');
const noBanner = core.getInput('noBanner');
githubWorkspacePath = path.resolve(githubWorkspacePath, target);
core.info(`πŸ“‚ Using ${githubWorkspacePath} as target`);
// required flags
const args = ['-tech', technology, '-target', githubWorkspacePath];
if (security) {
Expand Down
5 changes: 4 additions & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export async function run(): Promise<void> {
try {
const version = core.getInput('version') || 'latest'
const insider = await installer.getInsider(version)
const insiderPath = path.dirname(insider)

core.info(`πŸ“‚ Using ${insiderPath} as working directory...`)
process.chdir(insiderPath)

const args = getArguments()

Expand Down Expand Up @@ -34,7 +38,6 @@ function getArguments(): string[] {
const noBanner = core.getInput('noBanner')

githubWorkspacePath = path.resolve(githubWorkspacePath, target)
core.info(`πŸ“‚ Using ${githubWorkspacePath} as target`)

// required flags
const args = ['-tech', technology, '-target', githubWorkspacePath]
Expand Down

0 comments on commit 3e6ddd9

Please sign in to comment.