diff --git a/platformio/__init__.py b/platformio/__init__.py index 42f41245..46b06219 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 4, "0a3") +VERSION = (3, 4, "0a4") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/commands/run.py b/platformio/commands/run.py index f0643911..0565cd43 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -78,7 +78,7 @@ def cli(ctx, environment, target, upload_port, project_dir, silent, verbose, if config.has_option("platformio", "env_default"): env_default = [ e.strip() - for e in config.get("platformio", "env_default").split(",") + for e in config.get("platformio", "env_default").split(", ") ] results = [] @@ -159,15 +159,13 @@ class EnvironmentProcessor(object): terminal_width, _ = click.get_terminal_size() start_time = time() - # multi-line values to one line for k, v in self.options.items(): - if "\n" in v: - self.options[k] = self.options[k].strip() + self.options[k] = self.options[k].strip() if not self.silent: click.echo("[%s] Processing %s (%s)" % (datetime.now().strftime("%c"), click.style( - self.name, fg="cyan", bold=True), ", ".join([ + self.name, fg="cyan", bold=True), "; ".join([ "%s: %s" % (k, v.replace("\n", ", ")) for k, v in self.options.items() ]))) @@ -236,7 +234,7 @@ class EnvironmentProcessor(object): if self.targets: targets = [t for t in self.targets] elif "targets" in self.options: - targets = self.options['targets'].split() + targets = self.options['targets'].split(", ") return targets def _run(self): @@ -258,7 +256,9 @@ class EnvironmentProcessor(object): ], self.verbose) if "lib_deps" in self.options: _autoinstall_libdeps(self.cmd_ctx, [ - d.strip() for d in self.options['lib_deps'].split(", ") + d.strip() + for d in self.options['lib_deps'].split( + "\n" if "\n" in self.options['lib_deps'] else ", ") if d.strip() ], self.verbose) diff --git a/platformio/managers/package.py b/platformio/managers/package.py index 06b1c30f..6adb753e 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -607,7 +607,7 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): name, requirements, url = self.parse_pkg_input(name, requirements) package_dir = self.get_package_dir(name, requirements, url) - if not package_dir and not silent: + if not package_dir or not silent: msg = "Installing " + click.style(name, fg="cyan") if requirements: msg += " @ " + requirements diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 8b3fd7a1..b614b4f7 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -278,7 +278,10 @@ def measure_ci(): def on_run_environment(options, targets): - opts = ["%s=%s" % (opt, value) for opt, value in sorted(options.items())] + opts = [ + "%s=%s" % (opt, value.replace("\n", ", ") if "\n" in value else value) + for opt, value in sorted(options.items()) + ] targets = [t.title() for t in targets or ["run"]] on_event("Env", " ".join(targets), "&".join(opts))