Skip to content

Commit dc5ef04

Browse files
committed
Merge branch 'release/v3.4.2'
2 parents 6f215b1 + 8cda0b7 commit dc5ef04

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

Diff for: app/modules/library/sagas.js

+15-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/* eslint-disable no-constant-condition */
1818

1919
import * as actions from './actions';
20+
import * as pathlib from '@core/path';
2021
import * as selectors from './selectors';
2122

2223
import {
@@ -292,13 +293,23 @@ function* watchInstallLibrary() {
292293
let err,
293294
result = null;
294295
try {
295-
let args = ['lib'];
296+
let args = ['pkg', 'install'];
297+
const isPlatformIOProject = storageDir
298+
? yield call(backendFetchData, {
299+
query: 'os.is_file',
300+
params: [pathlib.join(storageDir, 'platformio.ini')],
301+
})
302+
: false;
296303
if (storageDir) {
297-
args = args.concat(['--storage-dir', storageDir]);
298-
} else {
304+
args = args.concat([
305+
isPlatformIOProject ? '--project-dir' : '--storage-dir',
306+
storageDir,
307+
]);
308+
}
309+
if (!isPlatformIOProject) {
299310
args.push('--global');
300311
}
301-
args = args.concat(['install', lib]);
312+
args = args.concat(['--library', lib]);
302313
result = yield call(backendFetchData, {
303314
query: 'core.call',
304315
params: [args, { force_subprocess: true }],

Diff for: app/modules/platform/sagas.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ function* watchInstallPlatform() {
290290

291291
result = yield call(backendFetchData, {
292292
query: 'core.call',
293-
params: [['platform', 'install', platform], { force_subprocess: true }],
293+
params: [
294+
['pkg', 'install', '--global', '--platform', platform],
295+
{ force_subprocess: true },
296+
],
294297
});
295298

296299
ReactGA.timing({

Diff for: app/modules/project/sagas.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ function* watchSaveProjectConfig() {
444444
try {
445445
yield call(ensureUserConsent, PROJECT_CONFIG_SAVE_CONSENT_ID, {
446446
content: `Warning!
447-
The entire file contents or platformio.ini will be rewritten with the current
447+
The entire file contents of platformio.ini will be rewritten with the current
448448
configuration defined in this UI.
449449
Continue to save the configuration?`,
450450
okText: 'Save',

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "platformio-home",
3-
"version": "3.4.1",
3+
"version": "3.4.2",
44
"description": "PlatformIO Home",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)