Fix to use correct $php_dir

This commit is contained in:
Shivam Mathur 2020-05-17 03:39:04 +05:30
parent c30a9630bb
commit 08c60fceea
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
5 changed files with 7 additions and 11 deletions

View File

@ -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(

5
dist/index.js vendored
View File

@ -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;
/**

View File

@ -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
);
}

View File

@ -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('.', '')

View File

@ -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') {