mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Don't build empty project // Resolve #483
This commit is contained in:
@ -83,12 +83,18 @@ def BuildProgram(env):
|
||||
LIBPATH=["$BUILD_DIR"]
|
||||
)
|
||||
|
||||
sources = env.LookupSources(
|
||||
"$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False,
|
||||
src_filter=getenv("PLATFORMIO_SRC_FILTER", env.get("SRC_FILTER")))
|
||||
|
||||
if not sources:
|
||||
env.Exit(
|
||||
"Error: Nothing to build. Please put your source code files "
|
||||
"to '%s' folder" % env.subst("$PROJECTSRC_DIR"))
|
||||
|
||||
return env.Program(
|
||||
join("$BUILD_DIR", env.subst("$PROGNAME")),
|
||||
env.LookupSources(
|
||||
"$BUILDSRC_DIR", "$PROJECTSRC_DIR", duplicate=False,
|
||||
src_filter=getenv("PLATFORMIO_SRC_FILTER",
|
||||
env.get("SRC_FILTER")))
|
||||
sources
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user