mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 02:27:13 +02:00
Better printing of relative path for removed objects
This commit is contained in:
@ -285,10 +285,13 @@ def PioClean(env, clean_dir):
|
|||||||
if not isdir(clean_dir):
|
if not isdir(clean_dir):
|
||||||
print("Build environment is clean")
|
print("Build environment is clean")
|
||||||
env.Exit(0)
|
env.Exit(0)
|
||||||
|
clean_rel_path = relpath(clean_dir)
|
||||||
for root, _, files in walk(clean_dir):
|
for root, _, files in walk(clean_dir):
|
||||||
for file_ in files:
|
for f in files:
|
||||||
remove(join(root, file_))
|
dst = join(root, f)
|
||||||
print("Removed %s" % relpath(join(root, file_)))
|
remove(dst)
|
||||||
|
print("Removed %s" %
|
||||||
|
(dst if clean_rel_path.startswith(".") else relpath(dst)))
|
||||||
print("Done cleaning")
|
print("Done cleaning")
|
||||||
util.rmtree_(clean_dir)
|
util.rmtree_(clean_dir)
|
||||||
env.Exit(0)
|
env.Exit(0)
|
||||||
|
Reference in New Issue
Block a user