Skip to content

Commit

Permalink
try 4755
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Jul 6, 2023
1 parent 712ab66 commit ebcac3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ COPY --from=0 /workspace/test.test .
COPY build/test/entrypoint.sh .

# create output directory
RUN mkdir /workspace/test/output && chmod 777 /workspace/test/output
RUN mkdir /workspace/test/output && chmod 4777 /workspace/test/output

# run tests
USER egress
Expand Down
5 changes: 1 addition & 4 deletions pkg/config/output_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

"github.com/livekit/egress/pkg/types"
"github.com/livekit/protocol/livekit"
"github.com/livekit/protocol/logger"
)

type FileConfig struct {
Expand Down Expand Up @@ -127,7 +126,6 @@ func (o *FileConfig) updateFilepath(p *PipelineConfig, identifier string, replac
if o.UploadConfig == nil {
if dir != "" {
// create local directory
logger.Debugw(fmt.Sprintf("creating dir %s", dir))
if err := os.MkdirAll(dir, 0755); err != nil {
return err
}
Expand All @@ -139,8 +137,7 @@ func (o *FileConfig) updateFilepath(p *PipelineConfig, identifier string, replac
tempDir := path.Join(p.LocalOutputDirectory, p.Info.EgressId)

// create temporary directory
logger.Debugw(fmt.Sprintf("creating tempDir %s", tempDir))
if err := os.MkdirAll(tempDir, 0755); err != nil {
if err := os.Mkdir(tempDir, 0755); err != nil {
return err
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/config/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func NewServiceConfig(confString string) (*ServiceConfig, error) {
if conf.LocalOutputDirectory == "." {
conf.LocalOutputDirectory = os.TempDir()
}
if err := os.MkdirAll(conf.LocalOutputDirectory, 0755); err != nil {
return nil, err
}

if err := conf.initLogger("nodeID", conf.NodeID, "clusterID", conf.ClusterID); err != nil {
return nil, err
Expand Down

0 comments on commit ebcac3c

Please sign in to comment.