Skip to content

Commit

Permalink
maybe i messed up command
Browse files Browse the repository at this point in the history
  • Loading branch information
Dana-Prajea committed Mar 28, 2020
1 parent 65a4742 commit 24156db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ async function addCertificateToStore() {
async function signWithSigntool(fileName) {
try {
var vitalParameterIncluded = false;
var command = `"${signtool}" sign /sm /t ${timestampUrl} ${fileName}`;
var command = `"${signtool}" sign /sm /t ${timestampUrl}`;
const sha1 = core.getInput('certificatesha1');
if (sha1 != '') {
command = command + ` /sha1 "${sha1}"`;
Expand All @@ -174,6 +174,7 @@ async function signWithSigntool(fileName) {
if (!vitalParameterIncluded) {
console.log("You need to include a NAME or a SHA1 Hash for the certificate to sign with.");
}
command = command + ` ${fileName}`;
console.log("Final command: " + command);
const { stdout } = await asyncExec(command);
console.log(stdout);
Expand Down
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function signWithSigntool(fileName: string) {
try {
// var command = `"${signtool}" sign /sm /t ${timestampUrl} /sha1 "1d7ec06212fdeae92f8d3010ea422ecff2619f5d" /n "DanaWoo" ${fileName}`
var vitalParameterIncluded = false;
var command = `"${signtool}" sign /sm /t ${timestampUrl} ${fileName}`
var command = `"${signtool}" sign /sm /t ${timestampUrl}`
const sha1 : string= core.getInput('certificatesha1');
if (sha1 != ''){
command = command + ` /sha1 "${sha1}"`
Expand All @@ -68,6 +68,7 @@ async function signWithSigntool(fileName: string) {
if (!vitalParameterIncluded){
console.log("You need to include a NAME or a SHA1 Hash for the certificate to sign with.")
}
command = command + ` ${fileName}`;
console.log("Final command: " + command);
const { stdout } = await asyncExec(command);
console.log(stdout);
Expand Down

0 comments on commit 24156db

Please sign in to comment.