Skip to content

Commit 9a8209c

Browse files
committed
command/push: create the proper parent directory entries in tar
1 parent 928fdff commit 9a8209c

4 files changed

Lines changed: 36 additions & 3 deletions

File tree

‎command/push.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ func (c *PushCommand) Run(args []string) int {
203203
// Build the archiving options, which includes everything it can
204204
// by default according to VCS rules but forcing the data directory.
205205
archiveOpts := &archive.ArchiveOpts{
206-
VCS: archiveVCS,
207-
Extra: make(map[string]string),
206+
VCS: archiveVCS,
207+
Extra: map[string]string{
208+
DefaultDataDir: archive.ExtraEntryDir,
209+
},
208210
}
209211

210212
// Always store the state file in here so we can find state

‎command/push_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func TestPush_noUploadModules(t *testing.T) {
117117

118118
actual := testArchiveStr(t, archivePath)
119119
expected := []string{
120+
".terraform/",
120121
".terraform/terraform.tfstate",
121122
"child/",
122123
"child/main.tf",

‎vendor/github.com/hashicorp/atlas-go/archive/archive.go‎

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/vendor.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,9 +1083,11 @@
10831083
"revision": "c0cf0cb802adad24252ce1307c4c896edd566870"
10841084
},
10851085
{
1086+
"checksumSHA1": "FUiF2WLrih0JdHsUTMMDz3DRokw=",
10861087
"comment": "20141209094003-92-g95fa852",
10871088
"path": "github.com/hashicorp/atlas-go/archive",
1088-
"revision": "95fa852edca41c06c4ce526af4bb7dec4eaad434"
1089+
"revision": "8e45a6c8b2de014db767a42c3ee777f101e11624",
1090+
"revisionTime": "2016-08-24T17:34:10Z"
10891091
},
10901092
{
10911093
"checksumSHA1": "yylO3hSRKd0T4mveT9ho2OSARwU=",

0 commit comments

Comments
 (0)