mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
command/push: "Extra" value must be absolute
This commit is contained in:
parent
f0de3c3e91
commit
3aecc52bf3
@ -191,12 +191,21 @@ func (c *PushCommand) Run(args []string) int {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the absolute path for our data directory, since the Extra field
|
||||||
|
// value below needs to be absolute.
|
||||||
|
dataDirAbs, err := filepath.Abs(c.DataDir())
|
||||||
|
if err != nil {
|
||||||
|
c.Ui.Error(fmt.Sprintf(
|
||||||
|
"Error while expanding the data directory %q: %s", c.DataDir(), err))
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
// Build the archiving options, which includes everything it can
|
// Build the archiving options, which includes everything it can
|
||||||
// by default according to VCS rules but forcing the data directory.
|
// by default according to VCS rules but forcing the data directory.
|
||||||
archiveOpts := &archive.ArchiveOpts{
|
archiveOpts := &archive.ArchiveOpts{
|
||||||
VCS: archiveVCS,
|
VCS: archiveVCS,
|
||||||
Extra: map[string]string{
|
Extra: map[string]string{
|
||||||
DefaultDataDir: c.DataDir(),
|
DefaultDataDir: dataDirAbs,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if !moduleUpload {
|
if !moduleUpload {
|
||||||
|
Loading…
Reference in New Issue
Block a user