ThisCalculator

Everyday

Bolt Project Deleted Empty Export?

Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered

If you are asking whether the Bolt project deletes an empty export, the answer is no: Bolt does not automatically delete an empty export folder or file. However, some build tools or cleanup scripts you run alongside Bolt may remove empty directories, which can make it look like Bolt did it. This article explains what Bolt actually does, why empty exports can disappear, and how to control the behavior.

Formula

The average pace is the total time divided by the distance:

pace = t / d

where t is the finish time in minutes and d is the distance in kilometers. The average speed is the distance divided by the time in hours:

speed = d / (t / 60)

Both results are standard for running or cycling pace calculations.

Worked Example

Using the default values: t = 50 minutes, d = 10 km.

  1. Pace = 50 / 10 = 5.00 min/km
  2. Speed = 10 / (50 / 60) = 10 / 0.8333 = 12.00 km/h

The calculator shows 5.00 min/km and 12.00 km/h, matching the example.

What the Bolt Project Actually Does

Bolt is a build tool for the Swift programming language, often used for iOS and macOS projects. When you run bolt build, it compiles your code and produces an executable or library. The export step, if you use a plugin or a custom script, copies the built product to a specified folder. Bolt itself does not have a built-in feature that deletes empty folders after export. If you see an empty export folder disappear, it is likely because of one of these reasons:

  • Your build script includes a rm -rf command that removes the folder before or after copying.
  • A cleanup tool like swift package clean or a CI job removes empty directories.
  • The export destination is on a file system that automatically prunes empty directories (rare).

Why an Empty Export Might Vanish

If you run a command like rm -rf "$(pwd)/export" in your build phase, it will delete the folder even if it is empty. Similarly, some file managers or version control systems ignore empty folders, so they may not appear in your project tree. If you are using a continuous integration service, the build agent might clean the workspace between builds, which removes any empty directories you created.

How to Prevent Unwanted Deletion

To keep an empty export folder, you can:

  • Place a placeholder file (like .gitkeep) inside the folder.
  • Check your build script for any rm commands that target the export path.
  • Use Bolt’s plugin system to copy files without deleting the destination.

Common Misconception: Bolt vs. Clean Scripts

Many developers confuse Bolt’s behavior with that of other tools. For example, swift package clean removes build artifacts but does not touch your export folder. If you have a Makefile or a shell script that runs rm -rf before building, that is the culprit. Always read your build configuration to see what commands run during the export phase.

Alternatives to Manual Export

If you want a more reliable export process, consider using a dedicated tool like rsync or a CI artifact system. These tools can copy files without deleting the destination, and they handle empty directories gracefully. For local builds, you can write a small script that creates the folder if it does not exist and then copies the built product.

Frequently Asked Questions

Does Bolt delete empty folders during a build?

No. Bolt does not have any logic that removes empty directories. If you see an empty export folder disappear, check your own build scripts or external cleanup tools.

How do I keep an empty export folder in my repository?

Add a placeholder file like .gitkeep inside the folder. This also makes Git track the folder, so it will not be ignored.

Can I configure Bolt to not delete anything?

Bolt does not delete anything by default. If you are using a plugin that removes files, you can edit the plugin’s configuration or write your own export step.

Why does my CI delete the export folder?

Most CI systems clean the workspace before each build. That is a feature, not a Bolt behavior. You can disable cleaning or use a separate artifact storage.

Is there a way to see what Bolt is doing during export?

Run bolt build --verbose to see detailed logs. That will show you every command Bolt executes, including any file operations.

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.