Skip to content

Commit 8ed2bb6

Browse files
DvdGiessenkefranabg
authored andcommitted
fix($last-updated): use file author time instead of submodule commit time (#1639)
1 parent 7f4de6a commit 8ed2bb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/prepare/util.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ exports.encodePath = function (userpath) {
7878
exports.getGitLastUpdatedTimeStamp = function (filePath) {
7979
let lastUpdated
8080
try {
81-
lastUpdated = parseInt(spawn.sync('git', ['log', '-1', '--format=%ct', filePath]).stdout.toString('utf-8')) * 1000
81+
lastUpdated = parseInt(spawn.sync(
82+
'git',
83+
['log', '-1', '--format=%ct', path.basename(filePath)],
84+
{ cwd: path.dirname(filePath) }
85+
).stdout.toString('utf-8')) * 1000
8286
} catch (e) { /* do not handle for now */ }
8387
return lastUpdated
8488
}

0 commit comments

Comments
 (0)