Skip to content

Commit

Permalink
Merge branch 'release/v3.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jun 14, 2022
2 parents 6f215b1 + 8cda0b7 commit dc5ef04
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
19 changes: 15 additions & 4 deletions app/modules/library/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/* eslint-disable no-constant-condition */

import * as actions from './actions';
import * as pathlib from '@core/path';
import * as selectors from './selectors';

import {
Expand Down Expand Up @@ -292,13 +293,23 @@ function* watchInstallLibrary() {
let err,
result = null;
try {
let args = ['lib'];
let args = ['pkg', 'install'];
const isPlatformIOProject = storageDir
? yield call(backendFetchData, {
query: 'os.is_file',
params: [pathlib.join(storageDir, 'platformio.ini')],
})
: false;
if (storageDir) {
args = args.concat(['--storage-dir', storageDir]);
} else {
args = args.concat([
isPlatformIOProject ? '--project-dir' : '--storage-dir',
storageDir,
]);
}
if (!isPlatformIOProject) {
args.push('--global');
}
args = args.concat(['install', lib]);
args = args.concat(['--library', lib]);
result = yield call(backendFetchData, {
query: 'core.call',
params: [args, { force_subprocess: true }],
Expand Down
5 changes: 4 additions & 1 deletion app/modules/platform/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ function* watchInstallPlatform() {

result = yield call(backendFetchData, {
query: 'core.call',
params: [['platform', 'install', platform], { force_subprocess: true }],
params: [
['pkg', 'install', '--global', '--platform', platform],
{ force_subprocess: true },
],
});

ReactGA.timing({
Expand Down
2 changes: 1 addition & 1 deletion app/modules/project/sagas.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function* watchSaveProjectConfig() {
try {
yield call(ensureUserConsent, PROJECT_CONFIG_SAVE_CONSENT_ID, {
content: `Warning!
The entire file contents or platformio.ini will be rewritten with the current
The entire file contents of platformio.ini will be rewritten with the current
configuration defined in this UI.
Continue to save the configuration?`,
okText: 'Save',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "platformio-home",
"version": "3.4.1",
"version": "3.4.2",
"description": "PlatformIO Home",
"repository": {
"type": "git",
Expand Down

0 comments on commit dc5ef04

Please sign in to comment.