FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
frontend/tools/sync-githooks.js at master · devhttps/frontend · GitHub
devhttps
/
frontend
Public
forked from
guardian/frontend
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
frontend
/
tools
/
sync-githooks.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
18 lines (14 loc) · 453 Bytes
Breadcrumbs
frontend
/
tools
/
sync-githooks.js
Copy path
File metadata and controls
executable file
·
18 lines (14 loc) · 453 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env node
const
path
=
require
(
'path'
)
;
const
fs
=
require
(
'fs'
)
;
const
rimraf
=
require
(
'rimraf'
)
;
const
src
=
path
.
resolve
(
__dirname
,
'..'
,
'git-hooks'
)
;
const
target
=
path
.
resolve
(
__dirname
,
'..'
,
'.git'
,
'hooks'
)
;
// always try and remove any old ones
try
{
rimraf
.
sync
(
target
)
;
}
catch
(
e
)
{
/* do nothing */
}
// TC doesn't want them, but everyone else does
if
(
process
.
env
.
TEAMCITY
!==
'true'
)
fs
.
symlinkSync
(
src
,
target
)
;
Back
|
FazBrowse Home
|
New Git URL