git-coco 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.mjs +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.esm.mjs
CHANGED
|
@@ -1611,7 +1611,8 @@ function execPromise(command, options = {}) {
|
|
|
1611
1611
|
* @returns {Promise<boolean>} - A promise that resolves to true if the package is installed successfully, false otherwise.
|
|
1612
1612
|
*/
|
|
1613
1613
|
async function installNpmPackage({ name, flags = [], cwd = process.cwd(), }) {
|
|
1614
|
-
const
|
|
1614
|
+
const version = name.includes('@') ? '' : '@latest';
|
|
1615
|
+
const { stdout, stderr } = await execPromise(`npm i ${name}${version} ${flags.join(' ')} --yes`, { cwd });
|
|
1615
1616
|
if (stderr) {
|
|
1616
1617
|
console.error(`Execution error: ${stderr}`);
|
|
1617
1618
|
return false;
|
package/dist/index.js
CHANGED
|
@@ -1632,7 +1632,8 @@ function execPromise(command, options = {}) {
|
|
|
1632
1632
|
* @returns {Promise<boolean>} - A promise that resolves to true if the package is installed successfully, false otherwise.
|
|
1633
1633
|
*/
|
|
1634
1634
|
async function installNpmPackage({ name, flags = [], cwd = process.cwd(), }) {
|
|
1635
|
-
const
|
|
1635
|
+
const version = name.includes('@') ? '' : '@latest';
|
|
1636
|
+
const { stdout, stderr } = await execPromise(`npm i ${name}${version} ${flags.join(' ')} --yes`, { cwd });
|
|
1636
1637
|
if (stderr) {
|
|
1637
1638
|
console.error(`Execution error: ${stderr}`);
|
|
1638
1639
|
return false;
|