mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix "clean" target
This commit is contained in:
@ -89,12 +89,6 @@ if not int(ARGUMENTS.get("PIOVERBOSE", 0)):
|
||||
|
||||
env = DefaultEnvironment(**DEFAULT_ENV_OPTIONS)
|
||||
|
||||
if env.GetOption('clean'):
|
||||
env.PioClean(env.subst("$BUILD_DIR"))
|
||||
env.Exit(0)
|
||||
elif not int(ARGUMENTS.get("PIOVERBOSE", 0)):
|
||||
print("Verbose mode can be enabled via `-v, --verbose` option")
|
||||
|
||||
# Load variables from CLI
|
||||
for key in list(clivars.keys()):
|
||||
if key in env:
|
||||
@ -102,6 +96,12 @@ for key in list(clivars.keys()):
|
||||
if isinstance(env[key], bytes):
|
||||
env[key] = env[key].decode()
|
||||
|
||||
if env.GetOption('clean'):
|
||||
env.PioClean(env.subst("$BUILD_DIR"))
|
||||
env.Exit(0)
|
||||
elif not int(ARGUMENTS.get("PIOVERBOSE", 0)):
|
||||
print("Verbose mode can be enabled via `-v, --verbose` option")
|
||||
|
||||
env.GetProjectConfig().validate([env['PIOENV']], silent=True)
|
||||
env.LoadProjectOptions()
|
||||
env.LoadPioPlatform()
|
||||
|
@ -12,13 +12,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
|
||||
import click
|
||||
from twisted.internet import protocol # pylint: disable=import-error
|
||||
|
||||
from platformio.commands.debug import helpers
|
||||
from platformio.compat import string_types
|
||||
from platformio.proc import get_pythonexe_path
|
||||
from platformio.project.helpers import get_project_core_dir
|
||||
|
||||
LOG_FILE = None
|
||||
@ -31,7 +30,7 @@ class BaseProcess(protocol.ProcessProtocol, object):
|
||||
COMMON_PATTERNS = {
|
||||
"PLATFORMIO_HOME_DIR": helpers.escape_path(get_project_core_dir()),
|
||||
"PLATFORMIO_CORE_DIR": helpers.escape_path(get_project_core_dir()),
|
||||
"PYTHONEXE": os.getenv("PYTHONEXEPATH", "")
|
||||
"PYTHONEXE": get_pythonexe_path()
|
||||
}
|
||||
|
||||
def apply_patterns(self, source, patterns=None):
|
||||
|
Reference in New Issue
Block a user