diff --git a/lib/tessel/deployment/rust.js b/lib/tessel/deployment/rust.js
index <HASH>..<HASH> 100644
--- a/lib/tessel/deployment/rust.js
+++ b/lib/tessel/deployment/rust.js
@@ -28,7 +28,7 @@ var exportables = {
       var cargoToml = toml.parse(fs.readFileSync(path.join(pushdir, 'Cargo.toml'), 'utf8'));
 
       if (cargoToml.package) {
-        basename = path.basename(program);
+        basename = pushdir;
         program = cargoToml.package.name;
       }
Fixes undefined variable when running t2 run Cargo.toml