Skip to content

Commit

Permalink
Fix to use correct $php_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed May 16, 2020
1 parent c30a963 commit 08c60fc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion __tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Config tests', () => {
'win32'
);
expect(win32).toContain(
'Add-Content C:\\tools\\php\\php.ini "post_max_size=256M\nshort_open_tag=On\ndate.timezone=Asia/Kolkata"'
'Add-Content "$php_dir\\php.ini" "post_max_size=256M\nshort_open_tag=On\ndate.timezone=Asia/Kolkata"'
);

win32 = await config.addINIValues(
Expand Down
5 changes: 1 addition & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2269,10 +2269,7 @@ async function addINIValuesWindows(ini_values_csv) {
script +=
(await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n';
});
return ('Add-Content C:\\tools\\php\\php.ini "' +
ini_values.join('\n') +
'"' +
script);
return ('Add-Content "$php_dir\\php.ini" "' + ini_values.join('\n') + '"' + script);
}
exports.addINIValuesWindows = addINIValuesWindows;
/**
Expand Down
5 changes: 1 addition & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ export async function addINIValuesWindows(
(await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n';
});
return (
'Add-Content C:\\tools\\php\\php.ini "' +
ini_values.join('\n') +
'"' +
script
'Add-Content "$php_dir\\php.ini" "' + ini_values.join('\n') + '"' + script
);
}

Expand Down
3 changes: 2 additions & 1 deletion src/scripts/ext/blackfire.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Param (

$tick = ([char]8730)
$php_dir = 'C:\tools\php'
$ext_dir = $php_dir + '\ext'
if($env:RUNNER -eq 'self-hosted') { $php_dir = "$php_dir$version" }
$ext_dir = "$php_dir\ext"
$arch='x64'
if ($version -lt '7.0') { $arch='x86' }
$version = $version.replace('.', '')
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/ext/phalcon.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Function Install-Phalcon() {
$tick = ([char]8730)
$domain = 'https://github.com'
$php_dir = 'C:\tools\php'
$ext_dir = $php_dir + '\ext'
if($env:RUNNER -eq 'self-hosted') { $php_dir = "$php_dir$version" }
$ext_dir = "$php_dir\ext"
$extension_version = $extension.substring($extension.Length - 1)

if($extension_version -eq '4') {
Expand Down

0 comments on commit 08c60fc

Please sign in to comment.