Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeyexl committed Oct 25, 2024
1 parent db8596a commit 50cbf1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31877,12 +31877,8 @@ async function main() {
core.info("Checking for changed files.");
// Check if git is available
let hasGit;
core.info('outside try');
core.info(execSync("git --version").toString())
try {
core.info('inside try');
core.info(execSync("git --version").toString());
const gitVersionCheck = execSync("git --version"); // Not working
const gitVersionCheck = execSync("git --version"); // Not working
if (gitVersionCheck.toString()) hasGit = true;
} catch (error) {
core.warning("Git isn't available. Skipping change checking.");
Expand All @@ -31893,7 +31889,8 @@ async function main() {
let changedFiles;

// Check if there are changed files
const statusResponse = execSync("git status", { cwd });
core.info("git status");
const statusResponse = execSync("git status");
const status = statusResponse.toString();
if (!status.includes("working tree clean")) changedFiles = true;
if (status.includes("not a git repository")) {
Expand Down
9 changes: 3 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,8 @@ async function main() {
core.info("Checking for changed files.");
// Check if git is available
let hasGit;
core.info('outside try');
core.info(execSync("git --version").toString())
try {
core.info('inside try');
core.info(execSync("git --version").toString());
const gitVersionCheck = execSync("git --version"); // Not working
const gitVersionCheck = execSync("git --version"); // Not working
if (gitVersionCheck.toString()) hasGit = true;
} catch (error) {
core.warning("Git isn't available. Skipping change checking.");
Expand All @@ -94,7 +90,8 @@ async function main() {
let changedFiles;

// Check if there are changed files
const statusResponse = execSync("git status", { cwd });
core.info("git status");
const statusResponse = execSync("git status");
const status = statusResponse.toString();
if (!status.includes("working tree clean")) changedFiles = true;
if (status.includes("not a git repository")) {
Expand Down

0 comments on commit 50cbf1e

Please sign in to comment.