Skip to content

Commit 799ca9c

Browse files
Fix wrong variable
1 parent 8cc42fd commit 799ca9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/cli/lib/commands/command.js.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const {{ service.name | caseLower }}{{ method.name | caseUcfirst }} = async ({ {
101101
'{{ key }}': '{{ header }}',
102102
{% endfor %}
103103
}, payload{% if method.type == 'location' %}, 'arraybuffer'{% endif %}).catch(err => {
104-
fs.unlinkSync(payload['{{ parameter.name }}']);
104+
fs.unlinkSync(archivePath);
105105
throw err
106106
});
107107
} else {
@@ -134,7 +134,7 @@ const {{ service.name | caseLower }}{{ method.name | caseUcfirst }} = async ({ {
134134
payload['{{ parameter.name }}'] = stream;
135135

136136
response = await client.call('{{ method.method | caseLower }}', path, headers, payload{% if method.type == 'location' %}, 'arraybuffer'{% endif %}).catch(err => {
137-
fs.unlinkSync(payload['{{ parameter.name }}']);
137+
fs.unlinkSync(archivePath]);
138138
throw err
139139
});
140140

0 commit comments

Comments
 (0)