Skip to content

Commit 199dcd8

Browse files
only allow compilation with .cash files
1 parent a44f872 commit 199dcd8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export function activate(context: ExtensionContext){
5757
// Subscribe to Commands here
5858
context.subscriptions.push(vscode.commands.registerCommand('cashscript.compile', () => {
5959
var filename = vscode.window.activeTextEditor.document.fileName;
60+
if(!filename.endsWith('.cash')) return; // force filename to end with .cash
6061
try{
6162
const artifact = compileFile(filename);
6263
const artifactJSON = JSON.stringify(artifact, null, 2);

0 commit comments

Comments
 (0)