forked from platformio/platformio-core
Fix a broken support for custom configuration file for pio debug
command // Resolve #3922
This commit is contained in:
@ -82,9 +82,10 @@ def cli(ctx, project_dir, project_conf, environment, verbose, interface, __unpro
|
||||
if "platform" not in env_options:
|
||||
raise ProjectEnvsNotAvailableError()
|
||||
|
||||
debug_config = DebugConfigFactory.new(
|
||||
init_platform(env_options["platform"]), project_config, env_name
|
||||
)
|
||||
with fs.cd(project_dir):
|
||||
debug_config = DebugConfigFactory.new(
|
||||
init_platform(env_options["platform"]), project_config, env_name
|
||||
)
|
||||
|
||||
if "--version" in __unprocessed:
|
||||
return subprocess.run(
|
||||
|
@ -146,9 +146,7 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes
|
||||
)
|
||||
|
||||
def _load_build_data(self):
|
||||
data = load_project_ide_data(
|
||||
os.path.dirname(self.project_config.path), self.env_name, cache=True
|
||||
)
|
||||
data = load_project_ide_data(os.getcwd(), self.env_name, cache=True)
|
||||
if data:
|
||||
return data
|
||||
raise DebugInvalidOptionsError("Could not load a build configuration")
|
||||
|
@ -105,6 +105,7 @@ def predebug_project(
|
||||
ctx.invoke(
|
||||
cmd_run,
|
||||
project_dir=project_dir,
|
||||
project_conf=project_config.path,
|
||||
environment=[env_name],
|
||||
target=["__debug"] + (["upload"] if preload else []),
|
||||
verbose=verbose,
|
||||
|
@ -384,7 +384,7 @@ class ProjectConfigDirsMixin(object):
|
||||
if result is None:
|
||||
return None
|
||||
|
||||
project_dir = os.path.dirname(self.path)
|
||||
project_dir = os.getcwd()
|
||||
|
||||
# patterns
|
||||
if "$PROJECT_HASH" in result:
|
||||
|
Reference in New Issue
Block a user