MCPcopy Create free account
hub / github.com/Shopify/function-examples / ensureNoGitChanges

Function ensureNoGitChanges

util/expand-liquid.js:110–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108}
109
110function ensureNoGitChanges() {
111 exec('git status --porcelain', (error, stdout, _stderr) => {
112 if (error) {
113 console.error(`error calling \`git status\`: ${error}`);
114 process.exit(1);;
115 }
116 if (stdout) {
117 console.error('Untracked files detected:\n', stdout);
118 exec('git diff', (error, stdout, _stderr) => {
119 if (error) {
120 console.error(`error calling \`git diff\`: ${error}`);
121 } else {
122 console.log(`Git diff:\n${stdout}`);
123 }
124 process.exit(1);
125 });
126 }
127 });
128}
129
130const flavor = process.argv[2] || "vanilla-js";
131

Callers 1

expand-liquid.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected